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,7 +1,9 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
/// <summary>
/// This enum is used to identify each of the SignLanguage models
/// </summary>
public enum ModelIndex
{
FINGERSPELLING,

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>

View File

@@ -1,18 +0,0 @@
using System;
using UnityEngine;
using Unity.Barracuda;
/// <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;
}

View File

@@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: bce8507dcb30db447b69708ad4f5f962
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant: