|
Deki 1.3.0
Modular C++ 2D engine for embedded displays and desktop
|
Project-wide unit settings (inspector display preference, world scale). More...
#include <UnitProjectSettings.h>
Inherits DekiComponent.
Public Member Functions | |
| void | ApplyToGlobalCache () const |
| Public Member Functions inherited from DekiComponent | |
| DekiComponent () | |
| virtual | ~DekiComponent ()=default |
| DekiComponent (const DekiComponent &)=delete | |
| DekiComponent & | operator= (const DekiComponent &)=delete |
| virtual ComponentType | GetType () const =0 |
| virtual ComponentType | GetBaseType () const |
| virtual DekiBehaviour * | AsBehaviour () |
| virtual bool | DeclaresUpdate () const |
| Does this class (or a reflected base) declare Update()? | |
| DekiObject * | GetOwner () const |
| void | SetOwner (DekiObject *owner) |
| virtual void | LoadAssets () |
| Load assets needed by this component. | |
| virtual void | UnloadAssets () |
| Unload/clear assets held by this component. | |
| virtual void | RuntimeUpdate (float deltaTime) |
| Update this component (runtime only). | |
| virtual void | OnAssetRefResolved (const char *propertyName, void *asset, const char *guid) |
| Called after an AssetRef property is resolved by LifecycleManager. | |
| virtual bool | NeedsAssetLoading () const |
| Check if this component needs asset loading. | |
| virtual bool | NeedsRuntimeUpdate () const |
| Check if this component needs runtime updates. | |
| virtual bool | Deserialize (SceneFormat::SceneMsgPackParser &parser, uint32_t mapSize) |
| Deserialize component data from MessagePack. | |
| virtual void | ResolveObjectRefs (class Scene *scene) |
| Resolve all ObjectRef properties in this component. | |
| virtual void | RemapObjectRefs (const std::unordered_map< uint32_t, uint32_t > &idRemap) |
| Remap ObjectRef IDs after cloning/instantiation. | |
| bool | HasRefsResolved () const |
| void | MarkRefsResolved () |
| void | ResetRefsResolved () |
| virtual void | OnPropertyChanged (const char *propertyName) |
| Called when a property is modified via the editor. | |
Public Attributes | |
| UnitMode | inspectorUnit = UnitMode::Pixels |
| float | pixelsPerMeter = 16.0f |
Additional Inherited Members | |
| Static Public Attributes inherited from DekiComponent | |
| static constexpr ComponentType | StaticType = 0 |
| Protected Attributes inherited from DekiComponent | |
| DekiObject * | m_Owner |
| bool | m_RefsResolved |
Project-wide unit settings (inspector display preference, world scale).
Registered with DekiSettingsRegistry under the "Units" section. Internal storage is always meters; this struct only configures inspector display conversion and seeds default camera zoom.
Hot paths (inspector, scene view, cameras) read these values from a per-frame cache, DekiEngineSettings::Global(). Call ApplyToGlobalCache() after Project::Load and after any Project Settings edit so the cache picks up the new values without a project reopen.
|
inline |
| UnitMode UnitProjectSettings::inspectorUnit = UnitMode::Pixels |
| float UnitProjectSettings::pixelsPerMeter = 16.0f |