Add ButtonAttribute to display methods in editor properties panel
#1917
This commit is contained in:
@@ -2263,6 +2263,14 @@ void VisualScript::GetMethodSignature(int32 index, String& name, byte& flags, St
|
||||
}
|
||||
}
|
||||
|
||||
Variant VisualScript::InvokeMethod(int32 index, const Variant& instance, Span<Variant> parameters) const
|
||||
{
|
||||
auto& method = _methods[index];
|
||||
Variant result;
|
||||
VisualScriptingModule.InvokeMethod((void*)&method, instance, parameters, result);
|
||||
return result;
|
||||
}
|
||||
|
||||
Span<byte> VisualScript::GetMetaData(int32 typeID)
|
||||
{
|
||||
auto meta = Graph.Meta.GetEntry(typeID);
|
||||
|
||||
@@ -267,6 +267,9 @@ public:
|
||||
// Gets the signature data of the method.
|
||||
API_FUNCTION() void GetMethodSignature(int32 index, API_PARAM(Out) String& name, API_PARAM(Out) byte& flags, API_PARAM(Out) String& returnTypeName, API_PARAM(Out) Array<String>& paramNames, API_PARAM(Out) Array<String>& paramTypeNames, API_PARAM(Out) Array<bool>& paramOuts);
|
||||
|
||||
// Invokes the method.
|
||||
API_FUNCTION() Variant InvokeMethod(int32 index, const Variant& instance, Span<Variant> parameters) const;
|
||||
|
||||
// Gets the metadata of the script surface.
|
||||
API_FUNCTION() Span<byte> GetMetaData(int32 typeID);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user