-
Notifications
You must be signed in to change notification settings - Fork 0
class_has_method
NikkoTC edited this page Sep 4, 2023
·
2 revisions
This function returns true if class has a given method.
class_has_method(classID, methodName);
Argument | Description |
---|---|
classID | The unique class ID |
methodName | The method name as a string |
Boolean
if(class_has_method(MyClass, "load"))
{
var inst = create(MyClass);
inst.load(file);
array_push(customAssets, inst);
}
The above code will check if MyClass
has a method named load
, then create an instance of the class and call that method.