Files
speckle-unity/Assets/Speckle Connector/dmo/dScripts/dGUI/StringInList.cs
T
2021-05-27 12:29:12 -04:00

25 lines
628 B
C#

using System;
using UnityEngine;
public class StringInList : PropertyAttribute {
public delegate string[ ] GetStringList( );
public StringInList( params string[ ] list )
{
List = list;
}
public StringInList( Type type, string methodName )
{
var method = type.GetMethod( methodName );
if ( method != null ) {
List = method.Invoke( null, null ) as string[ ];
} else {
Debug.LogError( "NO SUCH METHOD " + methodName + " FOR " + type );
}
}
public string[ ] List { get; private set; }
}