Search Results for

    Show / Hide Table of Contents

    Class SceneObject

    Base class for objects that are parts of the scene (actors and scripts).

    Inheritance
    System.Object
    Object
    SceneObject
    Actor
    Script
    Implements
    ISerializable
    Inherited Members
    Object.__unmanagedPtr
    Object.__internalId
    Object.Finalize()
    Object.As<T>()
    Object.NewValue(Type)
    Object.New(String)
    Object.Find<T>(Guid, Boolean)
    Object.Find(Guid, Type, Boolean)
    Object.TryFind<T>(Guid)
    Object.TryFind(Guid, Type)
    Object.Destroy(Object, Single)
    Object.DestroyNow(Object)
    Object.Destroy<T>(T, Single)
    Object.Equals(Object)
    Object.GetUnmanagedPtr(Object)
    Object.GetUnmanagedInterface(Object, Type)
    Object.FromUnmanagedPtr(IntPtr)
    Object.MapObjectID(Guid)
    Object.RemapObjectID(Guid)
    Object.GetHashCode()
    Object.ID
    Object.TypeName
    Namespace: FlaxEngine
    Assembly: FlaxEngine.CSharp.dll
    Syntax
    [Unmanaged]
    public abstract class SceneObject : Object, ISerializable

    Constructors

    SceneObject()

    Initializes a new instance of the SceneObject.

    Declaration
    protected SceneObject()

    Properties

    HasParent

    Returns true if object has a parent assigned.

    Declaration
    [Unmanaged]
    public bool HasParent { get; }
    Property Value
    System.Boolean

    HasPrefabLink

    Gets a value indicating whether this object has a valid linkage to the prefab asset.

    Declaration
    [Unmanaged]
    public bool HasPrefabLink { get; }
    Property Value
    System.Boolean

    IsDuringPlay

    Determines whether object is during play (spawned/loaded and fully initialized).

    Declaration
    [Unmanaged]
    public bool IsDuringPlay { get; }
    Property Value
    System.Boolean

    PrefabID

    Gets the prefab asset ID. Empty if no prefab link exists.

    Declaration
    [Unmanaged]
    public Guid PrefabID { get; }
    Property Value
    System.Guid

    PrefabObjectID

    Gets the ID of the object within a prefab that is used for synchronization with this object. Empty if no prefab link exists.

    Declaration
    [Unmanaged]
    public Guid PrefabObjectID { get; }
    Property Value
    System.Guid

    Methods

    BreakPrefabLink()

    Breaks the prefab linkage for this object, all its scripts, and all child actors.

    Declaration
    [NoAnimate]
    [Unmanaged]
    public virtual void BreakPrefabLink()

    GetNamePath(Char)

    Gets the path containing name of this object and all parent objects in tree hierarchy separated with custom separator character (/ by default). Can be used to identify this object in logs.

    Declaration
    [Unmanaged]
    public string GetNamePath(char separatorChar = '/')
    Parameters
    System.Char separatorChar

    The character to separate the names.

    Returns
    System.String

    The full name path.

    LinkPrefab(Guid, Guid)

    Links scene object instance to the prefab asset and prefab object. Warning! This applies to the only this object (not scripts or child actors).

    Declaration
    [NoAnimate]
    [Unmanaged]
    public virtual void LinkPrefab(Guid prefabId, Guid prefabObjectId)
    Parameters
    System.Guid prefabId

    The prefab asset identifier.

    System.Guid prefabObjectId

    The prefab object identifier.

    SetParent(Actor, Boolean)

    Sets the parent actor.

    Declaration
    [Unmanaged]
    public virtual void SetParent(Actor value, bool canBreakPrefabLink)
    Parameters
    Actor value

    The new parent.

    System.Boolean canBreakPrefabLink

    True if can break prefab link on changing the parent.

    Extension Methods

    Extensions.ReflectiveCompare<T>(T, T)
    Extensions.RawClone<T>(T)
    In This Article
    Back to top Copyright © 2012-2024 Wojciech Figat