mirror of
https://github.com/aharabada/glitchy-engine-beef.git
synced 2026-09-06 05:01:53 +00:00
Scripting: Basic copying of entities during runtime + Reference Components using UUID
This commit is contained in:
@@ -114,6 +114,13 @@ class ScriptInstance : RefCounter
|
||||
_scriptClass.SetFieldValue<T>(_instance, field.[Friend]_monoField, value);
|
||||
}
|
||||
|
||||
public void CopyFieldValue(ScriptField field, ScriptInstance sourceInstance)
|
||||
{
|
||||
// TODO: I hate this!
|
||||
var data = sourceInstance.GetFieldValue<uint8[sizeof(GlitchyEngine.Math.Matrix)]>(field);
|
||||
SetFieldValue(field, data);
|
||||
}
|
||||
|
||||
/// Creates a new instance of the given component class and initializes it for the current entity.
|
||||
public MonoObject* CreateComponentInstance(ScriptClass componentClassType)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user