17 KiB
Project Dictionary
Project: Don't Wake Up My Dream (working title) Version: v1.3 | Last updated: 2026-03-14
How to Use
At the start of every new conversation, paste this document along with the Collaboration Spec into AI. This dictionary is a quick reference — it gives AI enough context to understand and use components correctly. For full detail, search the source file by component name in the project. The dictionary is a work-in-progress and does not cover all concepts. Always treat the most recently provided version as current. When a definition is incomplete or a new concept needs adding, tell AI to update the entry and bump the version number.
Conversation Goal
Tell AI what this session is for, e.g.:
- "Continue building the dictionary — today we're covering XXX"
- "Dictionary is ready, help me build a new level: XXX"
- "Modify the logic of level XXX: XXX"
Entry Template
ComponentName
Type: [Input / Logic / Visual / Audio / UI / Data / Manager / Utility / Base]
One-sentence summary of what it does.
Properties
prop— what it controls
Events
OnEventName— when it fires
Methods
MethodName(params)— what it does
[Optional — only if relevant] Freeze — freeze behavior Virtual — programmatic trigger behavior
Relation: CustomComponentA, CustomComponentB
(Only list custom project components, not Unity built-ins)
Dictionary Entries
MyMonoBehaviour
Type: Base Component
Base class for all custom components. Provides pause, timing, coroutine, and delay utilities.
Properties
paused— pause statedirectorUpdateMode— GameTime, UnscaledGameTime, or Manual
Methods
Pause()/Resume()New_WaitForSeconds(float)— pause-aware waitDelayActionCall(float, Action)— delayed actionNextFrameActionCall(Action)— next frame actionDestoryGameObject(GameObject)/DestoryAllChildren(GameObject)
TouchEventTrigger
Type: Input Component
Detects touch on a 2D collider. Fires events when touch begins or is released. Tracks one touch at a time.
Properties
triggerOnMoving— also triggers on finger slide in/outgroup— for batch freeze/unfreezetouchPosTarget— GameObject that follows touch in world space
Events
OnTouchBeganEvent— on touch beginOnReleaseBeganEvent— on touch release
Freeze — AddFreeze() blocks all input and force-releases. AddFreezeByGroup(group) for group-level freezing.
Virtual — TouchBeganDirectly() / OnVirtualTouched() trigger without a real finger.
Relation: Canvas, Helper, GameObjectValue, MyMonoBehaviour
ActiveEventTrigger
Type: Logic Component
Manages activation/deactivation events with enable types (Solo, Mutual, Sync). Triggers events on lifecycle callbacks.
Properties
enableType— Solo, Mutual, Sync, or NoneinitState— Default, Disabled, or EnabledgroupTag— group identifier for mutual triggersautoDeactived— auto deactivate after trigger
Events
OnAwakeTriggerEvent/OnStartTriggerEventOnEnableTriggerEvent/OnDisableTriggerEventOnDestroyTriggerEvent
Relation: MyMonoBehaviour, GameObjectFreezable
AudioEventTrigger
Type: Audio Component
Plays audio clips (SFX, BGM, Voice) with volume, looping, timeline binding, and percentage-based event triggers.
Properties
type— 0: SFX, 1: BGM, 2: VoicestartOnAwake— auto play on awakeclipList— list of AudioScriptableObjectminVolume— minimum volume clampplayPercents— trigger percentage (0–1)
Events
OnAudioPercentTrigger— fires at playPercentsOnAudioBeganTrigger— fires when audio startsOnAudioEndTrigger— fires when audio ends
Relation: AudioScriptableObject, GlobalObject, Helper
CollideEventTrigger
Type: Input Component
Detects 2D collision/trigger events. Supports tag filtering, target objects, and root-based detection.
Properties
TriggerType— Default, Center, or WholecolliderTag— tag to filter collisionstarget— specific target GameObjectroot— parent root for filteringTriggerOnceForTheSameTag— only trigger once per tag
Events
OnEnterEvent/OnExitEvent/OnStayEvent
Methods
- Delegates:
delegateOnTriggerEnter2D,delegateOnTriggerExit2D,delegateOnTriggerStay2D - Delegates:
delegateOnCollisionEnter2D,delegateOnCollisionExit2D,delegateOnCollisionStay2D
Relation: MyMonoBehaviour, GameObjectFreezable
ConfineToCollider2D
Type: Utility Component
Confines a GameObject's position within a collider or screen bounds. Fires events on border enter/exit.
Properties
targetCollider— collider to confine within (optional, uses screen bounds if null)debugInEditor— show gizmos in edit mode
Events
OnEnterBorder— fires when object enters borderOnExitBorder— fires when object exits border
GameObjectFollower
Type: Utility Component
Makes a GameObject follow a target Transform with offset. Supports rotation following and speed-based scaling.
Properties
target— target Transform to followoffset— position offsetforce— rotation follow forceenableSpeedScale— scale based on movement speedspeedThrethold— speed threshold for scaling
Relation: MyMonoBehaviour
GameObjectFreezable
Type: Utility Component
Adds freeze/unfreeze functionality to any GameObject. Supports group-based freezing.
Properties
group— freeze group name
Events
OnFreezed— fires when frozenOnNotFreezed— fires when unfrozen
Methods
AddFreeze()/RemoveFreeze()/ClearFreeze()AddFreezeByGroup(group)/RemoveFreezeByGroup(group)
Relation: MyMonoBehaviour
GameObjectOperation
Type: Logic Component
Evaluates mathematical formulas using NCalc. Computes results from GameObjectValue inputs.
Properties
formula— NCalc formula stringcomputePerFrame— recompute every frameresult— output GameObjectValuevalueList— input GameObjectValue list
Methods
length(vector),add(v1,v2),sub(v1,v2),cross(v1,v2)— built-in formula functions
Relation: GameObjectValue
GameObjectRecorder
Type: Utility Component
Records and replays Transform data. Supports interval-based recording and playback speed control.
Properties
transformToRecordReplay— target Transformmanual— manual recording modeplaymode— replay modereplaySpeed— playback speed multiplierrecordInterval— recording interval
Methods
StartRecording()/StopRecording()StartReplay()/StopReplay()AddRecord()— add single record in manual mode
GameObjectSetter
Type: Utility Component
Sets Transform, Rigidbody2D, and renderer properties. Supports position, rotation, scale, parent, velocity, and active state.
Properties
positionOffset— position offsetinitPostion— initial position (Left, Right, Top, Bottom, Center, Any)
Events
OnStart/OnSetPosition/OnSetRotation/OnSetLocalScale/OnSetParent
Methods
SetPosition(Transform/Vector3/GameObjectValue)SetRotation(Transform)/SetLocalScale(Transform/GameObjectValue)SetParent(Transform)/SetActive(GameObjectValue)SetRigidBody2DVelocity(Vector3/GameObjectValue)
Relation: MyMonoBehaviour, GameObjectValue
GameObjectShake
Type: Visual Component
Shakes a GameObject with rotation or translation. Supports normal and unscaled time.
Properties
duration/frequence/magnitude— shake parameterstarget— target to shake (defaults to self)shakeType— Rotate or TranslateUpdateMode— Normal or UnscaledTime
Events
OnTriggerBegin/OnTriggerEnd
Methods
Shake()— shake with default valuesShake(duration, frequence, magnitude)— shake with custom values
Relation: MyMonoBehaviour
GameObjectTrigger
Type: Logic Component
Triggers a UnityEvent with configurable timing (Immediate, NextFrame, Delay).
Properties
triggerTime— Immediately, NextFrame, or DelaydelayTime— delay in secondstriggerEvent— UnityEvent to trigger
Relation: MyMonoBehaviour
GameObjectValueData
Type: Data Component
Holds a list of GameObjectValue objects. Manages add/remove/copy operations.
Properties
list— list of GameObjectValue
Events
OnStart
Methods
Add(GameObjectValue)/Remove(GameObjectValue)CopyFrom(GameObjectValueData)
Relation: GameObjectValue
KeyEventTrigger
Type: Input Component
Detects keyboard input. Fires events on key down and key up.
Properties
keyId— KeyCode as integer (-1 for any key)group— freeze group
Events
OnKeyDown/OnKeyUp
Freeze — supports AddFreeze() / RemoveFreeze() by group.
ListEventTrigger
Type: Logic Component
Manages a list of UnityEvents with index control. Supports looping, random ordering, and sequential triggering.
Properties
presetList— list of TriggerEventsloop— loop after last triggerrandomOnAWake— randomize order on awakecurrentId— current trigger indexseed— random seed
Events
OnRandomFinished/AfterLastTrigger/InvalidTrigger/OnStartTrigger
Methods
Trigger()/Trigger(int i)TriggerAndIncreaseIndex()SetIndex(int i)/SetIndexRandom()RandomTriggerList()
Relation: GameObjectValue
VPEventTrigger
Type: Audio Component
Controls VideoPlayer playback. Fires events on start and stop.
Properties
timeUpdateMode— GameTime or UnscaledGameTimeplayOnAwake— auto play on awake
Events
OnStartEvent/OnStopEvent
Methods
Play()/Stop()Play(startTime, duration)— play a segment
Relation: MyMonoBehaviour
RendererSetter
Type: Visual Component
Sets color, material, and sprite on renderers. Supports multiple renderer types.
Properties
includeChild— apply to children
Methods
SetColor(Color/GameObjectValue/string)SetMaterial(Material)/SetSprite(Sprite)
GameObjectQueue
Type: Data Component
Manages a queue of GameObjectQueueHolders. Handles add/remove with before/after events.
Properties
holderList— list of holderscurrentId— current index
Events
OnAddItemEventTrigger/AfterAddedEventTriggerOnRemoveItemEventTrigger/BeforeRemovedEventTrigger
Methods
Add(GameObjectQueue)/Remove(GameObjectQueue)RemoveFirst()/RemoveLast()
Relation: GameObjectQueueHolder
GameObjectQueueHolder
Type: Data Component
Holds a single GameObject slot in a GameObjectQueue.
Properties
queue— the queue this holder belongs to
Relation: GameObjectQueue
GameObjectPseudo3D
Type: Utility Component
Detects contact with ground/surfaces using raycasts. Supports 2D and 3D raycasting with snap.
Properties
rayLength/contactLayer— ray configuseGroundZ/detect3d— mode flagssnap/snapOffset— snap to contact point
Events
OnContactedBegan/OnContactedEnd
Relation: MyMonoBehaviour
GameObjectList
Type: Data Component
Holds a list of GameObjects with index management. Supports random and sequential triggering.
Properties
list— list of GameObjectscurrentId— current indexseed/loop
Methods
Trigger(int i)/TriggerAll()/TriggerRandom(int count)Add(GameObject)/Remove(GameObject)AddAllChildren()/RemoveAllChildren()
Relation: GameObjectTrigger
MessageBox
Type: UI Component
Displays a message box with OK/Cancel buttons. Uses localization for text.
Properties
UI— the UI roottextMessage/textOK/textCancel
Methods
Show(bool)— show/hide
Relation: GlobalObject, Localization
GenericData
Type: Data (ScriptableObject)
Stores key-value data (bool, int, float, string, Vector3, GameObject). Supports save/load to JSON.
Properties
boolDict,intDict,floatDict,stringDict,vector3Dict,gameObjectDictversion— data version
Methods
GetBool/SetBool(key),GetInteger/SetInteger(key),GetFloat/SetFloat(key)GetString/SetString(key),GetVector3/SetVector3(key),GetGameObject/SetGameObject(key)Reset()/ClearAll()/Save()/Load()
GlobalObject
Type: Manager Component
Singleton. Manages global game state, audio scalers, localization, level data, and scene loading.
Properties
BGMScaler,SFXScaler,VoiceScalerglobalCanvas,currentLevelScene,levelTaskInstance(static) /levelNames/currentVersion
Methods
SetCurrentLevel(string)/ResetAllGameData()/LoadScene(string)
Relation: MyMonoBehaviour, LocalizationManager, LevelData, LevelTask
Canvas
Type: UI Component
Main game UI controller. Manages progress bar, pause/resume, hint, and game over screens.
Properties
HintButton,PauseButton,ResumeButton,HomeButton,SkipButtonprogress,textCenter,whiteScreen,playinggameMenu,inventoryUI,gameover
Events
onProgressStart/onProgressFinished/onDogHPEmpty
Methods
UpdateProgress(int)/ResetProgress()/AddProgress(int)OnGamePaused()/OnGameResumed()
Relation: MyMonoBehaviour, GlobalObject, GameObjectValue
Conversation
Type: UI Component
Displays conversation text with animation. Supports localization and voice playback.
Properties
KeyArray— localization key arrayuiText/uiBackgroundoneShot/dynamicSequence
Events
OnConversationLoaded/OnConversationEnd/OnEndList
Methods
ShowText(int id)/ShowTextAndIncreaseIndex()
Relation: MyMonoBehaviour, GlobalObject, ListEventTrigger
Dialogue
Type: UI Component
Displays dialogue with speaker name and content separately with animation.
Properties
KeyArray/speakerList/uiText/uiBackgroundoneShot/dynamicSequence
Events
OnEndList
Methods
ShowText(int id)/ShowItem(int i)
Relation: MyMonoBehaviour, GlobalObject, DialogueSpeaker, ListEventTrigger
DialogueSpeaker
Type: UI Component
Represents a dialogue speaker. Fires events on speak begin/end.
Properties
speakerName
Events
SpeakBeginEventTrigger/SpeakEndEventTrigger/OnEventList
Methods
SpeakBegin()/SpeakEnd()/Trigger(int i)
Relation: MyMonoBehaviour, ListEventTrigger
GameOver
Type: UI Component
Game over screen. Manages replay, continue, home, sharing, and screenshot.
Properties
sFailed/sSucceed— success/fail screensbtnSkip/btnContinue/btnShare/btnLeaderboardautoNextLevel/manualNextLevelsnapshotEffect/snapshotShow/snapshotTake
Methods
Replay()/Continue()/NextLevel()GotoHome()/GotoCatalog()/ShareClicked()
Relation: GlobalObject, SnapshotSprite
Localization
Type: Utility Component
Localizes text and sprites. Applies language-specific fonts and content.
Properties
customFontName/propertiesSavertextComponents/textMeshComponents/textMeshProComponentsspriteRendererComponents
Events
OnStart
Methods
Localize()/LocalizeText()/LocalizeTextMesh()/LocalizeTextMeshPro()SetSprite(SpriteRenderer)/SetImage(Image)
Relation: GlobalObject, PropertiesSaver
AutoTest
Type: Utility Component
Testing utility for automated gameplay. Provides UI for running test cases.
Properties
testList/caseList/uidropDownCommand/dropDownScene/dropDownEntrydata— GenericData for testing
Events
OnAutoNextBegan
Methods
Run()/Run(int i)/Run(string command)GenerateData()
Relation: MyMonoBehaviour, GenericData, LevelData
Block
Type: Utility Component
Wraps a GameObject's position for infinite scrolling. Moves object when it exits bounds.
Properties
widthInWorld/heightInWorld— wrap boundariesminRandomCount/maxRandomCount/randomActiveListdelay— movement delay
Events
OnBlockSwitched— when position wraps
Companion document: Game Collaboration Spec v1.0 This document is subject to change at any time — always treat the most recently provided version as current.