Skip to content

find_class_by_name

NikkoTC edited this page Sep 4, 2023 · 4 revisions

With this function you can get the class ID by its name.
If class was not found, it will return undefined.


Syntax

find_class_by_name(className);
Argument Description
className The class name as a string

Returns

Real (The unique class ID) or undefined


Example

var cls = find_class_by_name("MyClass");
if(cls)
{
	inst = create(cls);
}

The above code will get the class by name, and if it exists, it will create an instance of class.