Object

unityengine.Object (extern class) → AudioClip, AudioMixer, AudioMixerGroup, Component, GameObject, Mesh, TextAsset, Texture

Unity Object class extern binding for Ceramic. Base class for all Unity objects that can exist in scenes.

This is a minimal binding that includes object lifecycle management methods used by the Ceramic Unity backend.

Static Members

unity
Destroy(obj: Object, ?t: Single = 0.0): Void

Removes a GameObject, component or asset after a specified delay. The object will be destroyed at the beginning of the next frame after the delay has passed.

Name Type Default Description
obj Object The object to destroy
t Single 0.0 Optional delay in seconds before destroying the object (default: 0.0)

unity
DestroyImmediate(obj: Object, ?allowDestroyingAssets: Bool = false): Void

Destroys the object immediately. You should use Destroy instead. This function should only be used when writing editor code or when you need to destroy an object during serialization callbacks.

Name Type Default Description
obj Object The object to destroy immediately
allowDestroyingAssets Bool false If true, allows destroying assets (default: false)

unity
DontDestroyOnLoad(target: Object): Void

Makes the object persistent across scene loads. The object will not be destroyed when loading a new scene. Commonly used for singleton managers or persistent game state.

Name Type Description
target Object The object to make persistent

Instance Members

unity
GetInstanceID(): Int

Returns the instance ID of the object. The instance ID is a unique identifier for each object instance, guaranteed to be unique throughout the lifetime of the object.

Returns Description
Int Unique integer identifier for this object instance

Metadata

Name Parameters
:nativeGen -