Class WorldEntityInfoUtils
Utilities related to creating a UWE.WorldEntityInfo instance.
public static class WorldEntityInfoUtils
- Inheritance
-
WorldEntityInfoUtils
- Inherited Members
Methods
Create(PrefabInfo, CellLevel, Type, bool, Vector3)
Creates a new instance of the UWE.WorldEntityInfo class based on the given parameters.
public static WorldEntityInfo Create(PrefabInfo prefabInfo, LargeWorldEntity.CellLevel cellLevel, EntitySlot.Type slotType, bool zUp = false, Vector3 localScale = default)
Parameters
prefabInfoPrefabInfo- The object that holds the Class ID and TechType.
cellLevelLargeWorldEntity.CellLevel- The cell level of the prefab (should match whatever is used in the LargeWorldEntity component).
slotTypeEntitySlot.Type- The slot type of the prefab.
zUpbool- If true, the prefab will use its Z axis as the "up" direction. By default is false, and instead uses its Y axis to determine which way is up.
localScaleVector3- The local scale of the prefab when spawned. If left at default, aka (0, 0, 0) or UnityEngine.Vector3.zero, will automatically resolve to UnityEngine.Vector3.one.
Returns
- WorldEntityInfo
- The created UWE.WorldEntityInfo.
Create(string, TechType, CellLevel, Type, bool, Vector3)
Creates a new instance of the UWE.WorldEntityInfo class based on the given parameters.
public static WorldEntityInfo Create(string classId, TechType techType, LargeWorldEntity.CellLevel cellLevel, EntitySlot.Type slotType, bool zUp = false, Vector3 localScale = default)
Parameters
classIdstring- The Class ID of the prefab.
techTypeTechType- The TechType of the prefab.
cellLevelLargeWorldEntity.CellLevel- The cell level of the prefab (should match whatever is used in the LargeWorldEntity component).
slotTypeEntitySlot.Type- The slot type of the prefab.
zUpbool- If true, the prefab will use its Z axis as the "up" direction. By default is false, and instead uses its Y axis to determine which way is up.
localScaleVector3- The local scale of the prefab when spawned. If left at default, aka (0, 0, 0) or UnityEngine.Vector3.zero, will automatically resolve to UnityEngine.Vector3.one.
Returns
- WorldEntityInfo
- The created UWE.WorldEntityInfo.