Implemented MR feedback

This commit is contained in:
CoudronJerome
2023-03-28 15:37:17 +02:00
parent dfdb2ab10b
commit be8885a508
6 changed files with 47 additions and 39 deletions

View File

@@ -1,3 +1,4 @@
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
@@ -8,6 +9,23 @@ using Unity.Barracuda;
[CreateAssetMenu(menuName = "Create new Scriptable/ModelList")]
public class ModelList : ScriptableObject
{
/// <summary>
/// Small class to link a model to a courseIndex irrespective of its position in a list
/// </summary>
[Serializable]
public class ModelTuple
{
/// <summary>
/// ModelIndex to which the model corresponds
/// </summary>
public ModelIndex index;
/// <summary>
/// The model itself
/// </summary>
public NNModel model;
}
/// <summary>
/// Index of the currently active model
/// </summary>
@@ -23,9 +41,10 @@ public class ModelList : ScriptableObject
/// </summary>
/// <param name="modelIndex">ModelIndex of the model</param>
/// <returns>Model associated with this index, null if no model was found</returns>
public NNModel GetCurrentModel()
public ModelTuple GetCurrentModel()
{
return models[currentModelIndex].model;
//if(currentModelIndex < models.Find)
return models.Find(x => x.model == models[currentModelIndex].model);
}
/// <summary>