Class TargetObjectWithPath
Set target object and it's path. Enable to get target object from path even if a target would be lost while reloading scene Especially when it has different prefab or different scene
Namespace: Unity.Industrial.Forma.Staging
Syntax
[Serializable]
public class TargetObjectWithPath
Methods
GetTarget(in GameObject)
Get Target object. If it is empty, retrieve it from path
Declaration
public GameObject GetTarget(in GameObject source)
Parameters
Type | Name | Description |
---|---|---|
GameObject | source |
Returns
Type | Description |
---|---|
GameObject | Target Object |
SetTarget(in GameObject, in GameObject)
Set Target object (and set target path in Editor)
Declaration
public void SetTarget(in GameObject source, in GameObject target)
Parameters
Type | Name | Description |
---|---|---|
GameObject | source | |
GameObject | target |