RoomObject: Class used for each object and sub-object in a room (furniture, medical equipment, etc.).
More...
|
RoomObject | GetSubObject (string key) |
|
void | SetSubObject (string key, RoomObject value) |
|
Dictionary< string, RoomObject > | GetAllSubObjects () |
|
int | CountSubObjects () |
|
void | MonoSpawn (MonoBehaviour requester, Transform refTransform, Transform myParent=null) |
| MonoSpawn is used to handle instantiation of an object at time of level generation. WebGL builds can't handle Asyncronous loading of objects and non-Monobehaviour classes cannot run coroutines. So, to solve this, the RoomObject class uses that Monobehaviour object of the script that requested the Spawn() to actually run and manage the Coroutine.
|
|
IEnumerator | Spawn (Transform refTransform, Transform myParent=null) |
| Spawn is used to handle instantiation of an object at time of level generation.
|
|
void | MonoCreate (MonoBehaviour requester, Transform refTransform, Transform myParent=null) |
| MonoCreate has the same issues as MonoSpawn, above.
|
|
IEnumerator | Create (Transform refTransform, Transform myParent=null) |
| Create is used to handle instantiation of an object dynamically while the level is running. Works like Spawn(), but created to return notification of spawned object to script that requested the spawn. Which it does not seem to be doing yet TODO make this function talk back to the script that requested it.
|
|
RoomObject: Class used for each object and sub-object in a room (furniture, medical equipment, etc.).
◆ CountSubObjects()
int Cerebrum.RoomObject.CountSubObjects |
( |
| ) |
|
◆ Create()
IEnumerator Cerebrum.RoomObject.Create |
( |
Transform |
refTransform, |
|
|
Transform |
myParent = null |
|
) |
| |
Create is used to handle instantiation of an object dynamically while the level is running. Works like Spawn(), but created to return notification of spawned object to script that requested the spawn. Which it does not seem to be doing yet TODO make this function talk back to the script that requested it.
- Parameters
-
refTransform | Reference to existing transform with same position/rotation where new object should instantiate. |
myParent | (optional) Parent object that spawning object should be made a child of. Default is null. |
◆ GetAllSubObjects()
Dictionary< string, RoomObject > Cerebrum.RoomObject.GetAllSubObjects |
( |
| ) |
|
◆ GetSubObject()
RoomObject Cerebrum.RoomObject.GetSubObject |
( |
string |
key | ) |
|
◆ MonoCreate()
void Cerebrum.RoomObject.MonoCreate |
( |
MonoBehaviour |
requester, |
|
|
Transform |
refTransform, |
|
|
Transform |
myParent = null |
|
) |
| |
MonoCreate has the same issues as MonoSpawn, above.
- Parameters
-
requester | The MonoBehaviour that requested the spawn, which will be the MonoBehaviour that will actually run the Coroutine needed to spawn. |
refTransform | Reference to existing transform with same position/rotation where new object should instantiate. |
myParent | (optional) Parent object that spawning object should be made a child of. Default is null. |
◆ MonoSpawn()
void Cerebrum.RoomObject.MonoSpawn |
( |
MonoBehaviour |
requester, |
|
|
Transform |
refTransform, |
|
|
Transform |
myParent = null |
|
) |
| |
MonoSpawn is used to handle instantiation of an object at time of level generation. WebGL builds can't handle Asyncronous loading of objects and non-Monobehaviour classes cannot run coroutines. So, to solve this, the RoomObject class uses that Monobehaviour object of the script that requested the Spawn() to actually run and manage the Coroutine.
- Parameters
-
requester | The MonoBehaviour that requested the spawn, which will be the MonoBehaviour that will actually run the Coroutine needed to spawn. |
refTransform | Reference to existing transform with same position/rotation where new object should instantiate. |
myParent | (optional) Parent object that spawning object should be made a child of. Default is null. |
◆ SetSubObject()
void Cerebrum.RoomObject.SetSubObject |
( |
string |
key, |
|
|
RoomObject |
value |
|
) |
| |
◆ Spawn()
IEnumerator Cerebrum.RoomObject.Spawn |
( |
Transform |
refTransform, |
|
|
Transform |
myParent = null |
|
) |
| |
Spawn is used to handle instantiation of an object at time of level generation.
- Parameters
-
refTransform | Reference to existing transform with same position/rotation where new object should instantiate. |
myParent | (optional) Parent object that spawning object should be made a child of. Default is null. |
◆ gameObject
GameObject Cerebrum.RoomObject.gameObject |
|
getset |
◆ handle
AsyncOperationHandle<GameObject> Cerebrum.RoomObject.handle |
|
getset |
◆ locName
string Cerebrum.RoomObject.locName |
|
getset |
◆ locNum
int Cerebrum.RoomObject.locNum |
|
getset |
◆ locTransform
Transform Cerebrum.RoomObject.locTransform |
|
getset |
◆ objectAsset
string Cerebrum.RoomObject.objectAsset |
|
getset |
The documentation for this class was generated from the following file: