Interface ILunyEngine
- Namespace
- Luny /
- Assembly
- Luny.dll
See implementation: LunyEngine
public interface ILunyEngine
Expand Details ...
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.
Boolean HasService<TService>() where TService : LunyEngineServiceBase
Returns
- Boolean
Type Parameters
TService
IsObserverEnabled<T>()
Boolean IsObserverEnabled<T>() where T : ILunyEngineObserver
Returns
- Boolean
Type Parameters
T
TryGetObject(String, String, Int32)
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 = "", Int32 callerLineNumber = 0)
Parameters
| Type | Name | Description |
|---|---|---|
name |
||
callerFilePath |
||
callerLineNumber |
Returns
TryGetService<TService>(out TService)
Gets a service by type, may return false/null.
Boolean TryGetService<TService>(out TService service) where TService : LunyEngineServiceBase
Parameters
| Type | Name | Description |
|---|---|---|
service |
Returns
- Boolean
Type Parameters
TService