Interface ILunyEngine
- Namespace
- Luny
- Assembly
- Luny.dll
See implementation: LunyEngine
public interface ILunyEngine
Properties
Application
Application-level services, similar to UnityEngine.Application and UnityEditor.EditorApplication.
ILunyApplicationService Application { get; }
Property Value
Asset
Asset loading/unloading and caching. Enables asset lookup by path/name. Returns placeholder assets instead of throwing exceptions.
ILunyAssetService Asset { get; }
Property Value
Debug
Debug services, eg logging.
ILunyDebugService Debug { get; }
Property Value
Editor
Editor services. Safe to call in runtime code (no-op, returning defaults).
ILunyEditorService Editor { get; }
Property Value
Input
Input services, forwards Action Map events and provides access to most recent input state.
ILunyInputService Input { get; }
Property Value
Object
Object services, mainly creating new prefab/primitive instances.
ILunyObjectService Object { get; }
Property Value
Objects
In-scene LunyObject instances get registered (cached) here after creation or ownership transfer to LunyEngine.
ILunyObjectRegistry Objects { get; }
Property Value
Profiler
LunyEngine profiler maintains a runtime record of observer execution metrics.
ILunyEngineProfiler Profiler { get; }
Property Value
Scene
Scene services, including in-scene object queries by name/path/type and scene load/unload.
ILunySceneService Scene { get; }
Property Value
Time
Time services, eg delta time, elapsed seconds, frame count.
ILunyTimeService Time { get; }
Property Value
Methods
DisableObserver<T>()
void DisableObserver<T>() where T : ILunyEngineObserver
Type Parameters
T
EnableObserver<T>()
void EnableObserver<T>() where T : ILunyEngineObserver
Type Parameters
T
GetObserver<T>()
T GetObserver<T>() where T : ILunyEngineObserver
Returns
- T
Type Parameters
T
GetService<TService>()
Gets a service by type. Throws if the service is not registered. Note: essential services are exposed as properties.
TService GetService<TService>() where TService : LunyEngineServiceBase
Returns
- TService
Type Parameters
TService
HasService<TService>()
Queries if a service type is registered.
bool HasService<TService>() where TService : LunyEngineServiceBase
Returns
- bool
Type Parameters
TService
IsObserverEnabled<T>()
bool IsObserverEnabled<T>() where T : ILunyEngineObserver
Returns
- bool
Type Parameters
T
TryGetObject(string, string, int)
Will try to find an object by name in the scene. Queries already-cached objects first. Wraps found objects in a LunyObject instance.
ILunyObject TryGetObject(string name, string callerFilePath = "", int callerLineNumber = 0)
Parameters
namestringcallerFilePathstringcallerLineNumberint
Returns
TryGetService<TService>(out TService)
Gets a service by type, may return false/null.
bool TryGetService<TService>(out TService service) where TService : LunyEngineServiceBase
Parameters
serviceTService
Returns
- bool
Type Parameters
TService