Add ButtonAttribute to display methods in editor properties panel
#1917
This commit is contained in:
@@ -112,6 +112,12 @@ namespace FlaxEditor.Content
|
||||
throw new TargetException("Missing Visual Script asset.");
|
||||
_type.Asset.SetScriptInstanceParameterValue(_parameter.Name, (Object)obj, value);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public object Invoke(object obj, object[] parameters)
|
||||
{
|
||||
throw new NotSupportedException();
|
||||
}
|
||||
}
|
||||
|
||||
sealed class VisualScriptMethodInfo : IScriptMemberInfo
|
||||
@@ -240,6 +246,14 @@ namespace FlaxEditor.Content
|
||||
{
|
||||
throw new NotSupportedException();
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public object Invoke(object obj, object[] parameters)
|
||||
{
|
||||
if (!_type.Asset)
|
||||
throw new TargetException("Missing Visual Script asset.");
|
||||
return _type.Asset.InvokeMethod(_index, obj, parameters);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user