Table of Contents

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

ILunyApplicationService

Asset

Asset loading/unloading and caching. Enables asset lookup by path/name. Returns placeholder assets instead of throwing exceptions.

ILunyAssetService Asset { get; }

Property Value

ILunyAssetService

Debug

Debug services, eg logging.

ILunyDebugService Debug { get; }

Property Value

ILunyDebugService

Editor

Editor services. Safe to call in runtime code (no-op, returning defaults).

ILunyEditorService Editor { get; }

Property Value

ILunyEditorService

Input

Input services, forwards Action Map events and provides access to most recent input state.

ILunyInputService Input { get; }

Property Value

ILunyInputService

Object

Object services, mainly creating new prefab/primitive instances.

ILunyObjectService Object { get; }

Property Value

ILunyObjectService

Objects

In-scene LunyObject instances get registered (cached) here after creation or ownership transfer to LunyEngine.

ILunyObjectRegistry Objects { get; }

Property Value

ILunyObjectRegistry

Profiler

LunyEngine profiler maintains a runtime record of observer execution metrics.

ILunyEngineProfiler Profiler { get; }

Property Value

ILunyEngineProfiler

Scene

Scene services, including in-scene object queries by name/path/type and scene load/unload.

ILunySceneService Scene { get; }

Property Value

ILunySceneService

Time

Time services, eg delta time, elapsed seconds, frame count.

ILunyTimeService Time { get; }

Property Value

ILunyTimeService

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

name string
callerFilePath string
callerLineNumber int

Returns

ILunyObject

TryGetService<TService>(out TService)

Gets a service by type, may return false/null.

bool TryGetService<TService>(out TService service) where TService : LunyEngineServiceBase

Parameters

service TService

Returns

bool

Type Parameters

TService