Infohazard.Core 1.4.1
Infohazard Core Utility Library
Loading...
Searching...
No Matches
Infohazard.Core.SpawnParams Struct Reference

Used to pass spawn parameters to various object creation/initialization methods. More...

Static Public Member Functions

static SpawnParams At (Transform transform, bool parented=false, bool includeScene=false)
 Spawn at a given transform (copy position and rotation). More...
 

Public Attributes

Vector3? Position
 Position to spawn at (if null, do not set position). More...
 
Quaternion? Rotation
 Position to spawn at (if null, do not set rotation). More...
 
Vector3? Scale
 Scale to spawn at (if null, do not set the scale). More...
 
Transform Parent
 Parent to attach the object to. If null, no parent. More...
 
bool InWorldSpace
 If true, given position/rotation/scale are considered world space. If false, they are considered in the space of the parent. More...
 
ulong PersistedInstanceID
 Instance ID to pass to a IPersistedInstance script. More...
 
Scene? Scene
 Scene to spawn in, if Parent is null. More...
 

Static Public Attributes

static readonly SpawnParams Default = new SpawnParams()
 Default spawn params (no transform, parent, scene, or instance ID). More...
 

Detailed Description

Used to pass spawn parameters to various object creation/initialization methods.

Member Function Documentation

◆ At()

static SpawnParams Infohazard.Core.SpawnParams.At ( Transform  transform,
bool  parented = false,
bool  includeScene = false 
)
static

Spawn at a given transform (copy position and rotation).

Parameters
transformThe transform to spawn at.
parentedIf true, parent spawned object to given transform.
includeSceneIf true and parented is false, move to given transform's scene.
Returns
Resulting SpawnParams.

Member Data Documentation

◆ Default

readonly SpawnParams Infohazard.Core.SpawnParams.Default = new SpawnParams()
static

Default spawn params (no transform, parent, scene, or instance ID).

◆ InWorldSpace

bool Infohazard.Core.SpawnParams.InWorldSpace

If true, given position/rotation/scale are considered world space. If false, they are considered in the space of the parent.

◆ Parent

Transform Infohazard.Core.SpawnParams.Parent

Parent to attach the object to. If null, no parent.

◆ PersistedInstanceID

ulong Infohazard.Core.SpawnParams.PersistedInstanceID

Instance ID to pass to a IPersistedInstance script.

◆ Position

Vector3? Infohazard.Core.SpawnParams.Position

Position to spawn at (if null, do not set position).

◆ Rotation

Quaternion? Infohazard.Core.SpawnParams.Rotation

Position to spawn at (if null, do not set rotation).

◆ Scale

Vector3? Infohazard.Core.SpawnParams.Scale

Scale to spawn at (if null, do not set the scale).

◆ Scene

Scene? Infohazard.Core.SpawnParams.Scene

Scene to spawn in, if Parent is null.


The documentation for this struct was generated from the following file: