Search Results for

    Show / Hide Table of Contents

    Class SceneObject

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

    Inheritance
    Object
    ScriptingObject
    SceneObject
    Inherited Members
    ScriptingObject::_gcHandle
    ScriptingObject::_id
    ScriptingObject::_type
    SceneObject
    ScriptingObject::CanCast(const ScriptingTypeHandle& from, const ScriptingTypeHandle& to)
    ScriptingObject::CanCast(const MClass* from, const MClass* to)
    ScriptingObject::Cast(ScriptingObject* obj)
    ScriptingObject::ChangeID(const Guid& newId)
    ScriptingObject::CreateManaged()
    ScriptingObject::CreateManagedInternal()
    ScriptingObject::Deleted
    Object::DeleteObject(float timeToLive = 0.0f, bool useGameTime=false)
    Object::DeleteObjectNow()
    ISerializable::DeserializeIfExists(DeserializeStream& stream, const char* memberName, ISerializeModifier* modifier)
    SceneObject
    ScriptingObject::DestroyManaged()
    Object::Flags
    ScriptingObject::FromInterface(void* interfaceObj, const ScriptingTypeHandle& interfaceType)
    ScriptingObject::FromInterface(T* interfaceObj)
    ScriptingObject::GetClass()
    ScriptingObject::GetID()
    ScriptingObject::GetManagedInstance()
    ScriptingObject::GetOrCreateManagedInstance()
    ScriptingObject::GetType()
    ScriptingObject::GetTypeHandle()
    ScriptingObject::HasManagedInstance()
    ScriptingObject::Is(const ScriptingTypeHandle& type)
    ScriptingObject::Is(const MClass* type)
    ScriptingObject::Is()
    ScriptingObject::IsRegistered()
    ScriptingObject::NewObject(const ScriptingTypeHandle& typeHandle)
    ScriptingObject::NewObject()
    ScriptingObject::OnDeleteObject()
    ScriptingObject::OnManagedInstanceDeleted()
    ScriptingObject::OnScriptingDispose()
    ScriptingObject::RegisterObject()
    ScriptingObject::ScriptingObject(const SpawnParams& params)
    SceneObject
    SceneObject
    ScriptingObject::SetManagedInstance(MObject* instance)
    SceneObject
    ScriptingObject::ToInterface(ScriptingObject* obj, const ScriptingTypeHandle& interfaceType)
    ScriptingObject::ToInterface(ScriptingObject* obj)
    ScriptingObject::ToManaged(const ScriptingObject* obj)
    ScriptingObject::ToNative(MObject* obj)
    ScriptingObject::ToString()
    ScriptingObject::UnregisterObject()
    ISerializable::~ISerializable()
    Object::~Object()
    ScriptingObject::~ScriptingObject()
    Assembly: FlaxEngine.dll
    File: Engine/Level/SceneObject.h
    Syntax
    public class SceneObject : public ScriptingObject, public ISerializable

    Constructors

    ~SceneObject()

    Finalizes an instance of the SceneObject class.

    Declaration
    public ~SceneObject()

    SceneObject(const SpawnParams& params)

    Initializes a new instance of the SceneObject class.

    Declaration
    protected SceneObject(const SpawnParams& params)
    Parameters
    SpawnParams params

    The object initialization parameters.

    Fields

    _parent

    Declaration
    protected Actor* _parent
    Field Value
    Actor

    _prefabID

    Declaration
    protected Guid _prefabID
    Field Value
    Guid

    _prefabObjectID

    Declaration
    protected Guid _prefabObjectID
    Field Value
    Guid

    Methods

    BeginPlay(SceneBeginData* data)

    Called when adding object to the game.

    Declaration
    public virtual void BeginPlay(SceneBeginData* data) = 0
    Parameters
    SceneBeginData data

    The initialization data (e.g. used to collect joints to link after begin).

    BreakPrefabLink()

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

    Declaration
    public virtual void BreakPrefabLink()

    Deserialize(DeserializeStream& stream, ISerializeModifier* modifier)

    Deserializes object from the input stream.

    Declaration
    public virtual void Deserialize(DeserializeStream& stream, ISerializeModifier* modifier) override
    Parameters
    DeserializeStream stream

    The input stream.

    ISerializeModifier modifier

    The deserialization modifier object. Always valid.

    Overrides
    ISerializable::Deserialize(DeserializeStream& stream, ISerializeModifier* modifier)

    EndPlay()

    Called when removing object from the game.

    Declaration
    public virtual void EndPlay() = 0

    GetNamePath(Char separatorChar='/')

    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
    public String GetNamePath(Char separatorChar='/') const
    Parameters
    Char separatorChar

    The character to separate the names.

    Returns
    String

    The full name path.

    GetOrderInParent()

    Gets zero-based index in parent actor children list (scripts or child actors).

    Declaration
    public virtual int32 GetOrderInParent() const = 0
    Returns
    int32

    The order in parent.

    GetParent()

    Gets the parent actor (or null if object has no parent).

    Declaration
    public Actor* GetParent() const
    Returns
    Actor

    GetPrefabID()

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

    Declaration
    public Guid GetPrefabID() const
    Returns
    Guid

    GetPrefabObjectID()

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

    Declaration
    public Guid GetPrefabObjectID() const
    Returns
    Guid

    GetSceneObjectId()

    Gets the scene object ID.

    Declaration
    public virtual Guid GetSceneObjectId() const = 0
    Returns
    Guid

    The scene object ID.

    HasParent()

    Returns true if object has a parent assigned.

    Declaration
    public bool HasParent() const
    Returns
    bool

    HasPrefabLink()

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

    Declaration
    public bool HasPrefabLink() const
    Returns
    bool

    Initialize()

    Called after object loading or spawning to initialize the object (eg. call OnAwake for scripts) but before BeginPlay. Initialization should be performed only within a single SceneObject (use BeginPlay to initialize with a scene).

    Declaration
    public virtual void Initialize() = 0

    IsDuringPlay()

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

    Declaration
    public bool IsDuringPlay() const
    Returns
    bool

    LinkPrefab(const Guid& prefabId, const Guid& prefabObjectId)

    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
    public virtual void LinkPrefab(const Guid& prefabId, const Guid& prefabObjectId)
    Parameters
    Guid prefabId

    The prefab asset identifier.

    Guid prefabObjectId

    The prefab object identifier.

    Serialize(SerializeStream& stream, const void* otherObj)

    Serializes object to the output stream compared to the values of the other object instance (eg. default class object). If other object is null then serialize all properties.

    Declaration
    public virtual void Serialize(SerializeStream& stream, const void* otherObj) override
    Parameters
    SerializeStream stream

    The output stream.

    void otherObj

    The instance of the object to compare with and serialize only the modified properties. If null, then serialize all properties.

    Overrides
    ISerializable::Serialize(SerializeStream& stream, const void* otherObj)

    SetOrderInParent(int32 index)

    Sets zero-based index in parent actor children list (scripts or child actors).

    Declaration
    public virtual void SetOrderInParent(int32 index) = 0
    Parameters
    int32 index

    The new order in parent.

    SetParent(Actor* value)

    Sets the parent actor.

    Declaration
    public void SetParent(Actor* value)
    Parameters
    Actor value

    The new parent.

    Returns
    void

    SetParent(Actor* value, bool canBreakPrefabLink)

    Sets the parent actor.

    Declaration
    public virtual void SetParent(Actor* value, bool canBreakPrefabLink) = 0
    Parameters
    Actor value

    The new parent.

    bool canBreakPrefabLink

    True if can break prefab link on changing the parent.

    • Improve this Doc
    • View Source
    In This Article
    Back to top Copyright © 2012-2024 Wojciech Figat