Search Results for

    Show / Hide Table of Contents

    Class AssetSceneManager

    Asset Scene Manager class.

    Inheritance
    object
    IdentifiableObject
    DependencyObject
    AttachableObject
    SceneManager
    AssetSceneManager
    Implements
    IDependencyObject
    Inherited Members
    SceneManager.Managers
    SceneManager.Scene
    SceneManager.OnLoaded()
    SceneManager.OnAttached()
    SceneManager.OnActivated()
    SceneManager.Start()
    SceneManager.OnDeactivated()
    SceneManager.OnDetach()
    AttachableObject.AttachableStateChanged
    AttachableObject.IsEnabled
    AttachableObject.State
    AttachableObject.IsLoaded
    AttachableObject.IsAttached
    AttachableObject.IsActivated
    AttachableObject.IsStarted
    AttachableObject.IsDestroyed
    AttachableObject.ShouldBeActivated
    AttachableObject.Destroy()
    AttachableObject.DependencyBroken()
    DependencyObject.Dependencies
    DependencyObject.OnDependencyRemoved
    IdentifiableObject.Id
    IdentifiableObject.IdHasChanged(Guid)
    Namespace: Evergine.Framework.Managers
    Assembly: Evergine.Framework.dll
    Syntax
    public class AssetSceneManager : SceneManager, IDependencyObject

    Constructors

    AssetSceneManager()

    Initializes a new instance of the AssetSceneManager class.

    Declaration
    public AssetSceneManager()

    Fields

    assetService

    Asset service.

    Declaration
    [BindService(true)]
    protected AssetsService assetService
    Field Value
    Type Description
    AssetsService

    Methods

    AddReference(Guid, int)

    Adds an asset reference to the dictionary.

    Declaration
    public void AddReference(Guid id, int value = 1)
    Parameters
    Type Name Description
    Guid id

    The asset's ID.

    int value

    The value of the reference.

    Load<T>(Guid, bool)

    Loads an asset.

    Declaration
    public T Load<T>(Guid id, bool forceNewInstance = false) where T : ILoadable
    Parameters
    Type Name Description
    Guid id

    The asset ID to load.

    bool forceNewInstance

    Forces reloading the asset.

    Returns
    Type Description
    T

    The asset instance.

    Type Parameters
    Name Description
    T

    The asset type to load.

    Load<T>(string, bool)

    Loads an asset.

    Declaration
    public T Load<T>(string path, bool forceNewInstance = false) where T : ILoadable
    Parameters
    Type Name Description
    string path

    The path to load.

    bool forceNewInstance

    True to force a new instance of the asset.

    Returns
    Type Description
    T

    The loaded asset.

    Type Parameters
    Name Description
    T

    Type of the asset to load.

    Load<T>(string, Stream, bool)

    Loads an asset.

    Declaration
    public T Load<T>(string name, Stream stream, bool forceNewInstance = false) where T : ILoadable
    Parameters
    Type Name Description
    string name

    The name of the asset.

    Stream stream

    The stream of the asset.

    bool forceNewInstance

    True to force a new instance of the asset.

    Returns
    Type Description
    T

    The loaded asset.

    Type Parameters
    Name Description
    T

    Type of the asset to load.

    Exceptions
    Type Condition
    ArgumentNullException

    Stream is null.

    ArgumentNullException

    Asset name is null or empty.

    OnDestroy()

    Invoked when the object is about to be disposed.

    Declaration
    protected override void OnDestroy()
    Overrides
    SceneManager.OnDestroy()

    RegisterInstance<T>(ILoadable)

    Registers an instance of a scene asset into the scene manager.

    Declaration
    public bool RegisterInstance<T>(ILoadable asset) where T : ILoadable
    Parameters
    Type Name Description
    ILoadable asset

    The new asset.

    Returns
    Type Description
    bool

    True if the asset has been registered properly; false otherwise.

    Type Parameters
    Name Description
    T

    The type of the asset.

    RemoveReference(Guid, int, bool)

    Removes an asset reference from the dictionary.

    Declaration
    public void RemoveReference(Guid id, int value = 1, bool unload = false)
    Parameters
    Type Name Description
    Guid id

    The asset's ID.

    int value

    The value of the reference.

    bool unload

    If true, the asset service unload is called.

    Unload(Guid)

    Unloads the scene asset by GUID.

    Declaration
    public void Unload(Guid id)
    Parameters
    Type Name Description
    Guid id

    Asset GUID.

    Unload(string)

    Unloads the scene asset.

    Declaration
    public void Unload(string path)
    Parameters
    Type Name Description
    string path

    The path of the asset.

    Implements

    IDependencyObject

    Extension Methods

    ReflectionHelper.GetMemberAssembly(object)
    ReflectionHelper.GetTypeName(object)
    In this article
    Back to top
    Generated by DocFX