Documentation Index
Fetch the complete documentation index at: https://mintlify.com/ProwlEngine/Prowl/llms.txt
Use this file to discover all available pages before exploring further.
MonoBehaviour is the abstract base class for every script you attach to a GameObject in Prowl. You never instantiate it directly — instead you derive a class from it, add it to a GameObject via AddComponent<T>(), and override whichever lifecycle methods your script needs. The engine calls those methods at well-defined points in the frame: Awake once at creation, Start before the first active frame, Update every frame, FixedUpdate on physics ticks, and LateUpdate after all Update calls. MonoBehaviour also inherits the full identity, destruction, and cloning API from EngineObject, and mirrors the entire component query API of GameObject for convenience.
MonoBehaviour carries [CloneBehavior(CloneBehavior.ChildObject)], which means copies of a GameObject deep-copy its components rather than sharing references. To preserve a component’s stable GUID across copies the Identifier field is marked [CloneField(CloneFieldFlags.IdentityRelevant)].Core Properties
The
GameObject this component is attached to. Set automatically when the component is added via AddComponent.Shortcut to
GameObject.Transform. Equivalent to calling GameObject.Transform.Whether this component is individually enabled. Setting
false triggers OnDisable; setting true triggers OnEnable. Does not affect sibling components.true only when this component is enabled and its GameObject is enabled in the hierarchy. Read-only; updated automatically.The tag string of the owning
GameObject. Shortcut for GameObject.tag.The scene the owning
GameObject belongs to. null if the object has not been added to a scene.Persistent GUID for this component instance. Survives serialization round-trips. Used by the prefab system to correlate components across copies.
Controls visibility of this component in the editor inspector and serialization output.
true after Awake has been called. The engine checks this flag to ensure Awake is only called once.true after Start has been called. OnDestroy is only invoked when this is true.When
true (set by [ExecuteAlways] attribute), lifecycle methods fire even when the game is not in play mode. Normally controlled by the attribute rather than set at runtime.Lifecycle Methods
Override any of the followingpublic virtual methods in your derived class. You do not call the base implementation unless you explicitly need to chain behavior.
- Initialization
- Per-Frame
- Disable / Destroy
Awake
Called once when the component is first created (or when theGameObject is instantiated), before any Start calls on any object. Use this to set up internal state that does not depend on other objects.OnEnable
Called when the component becomes active — either whenAwake completes (if already active) or whenever Enabled transitions to true.Start
Called once, on the first frame the component is active and after allAwake calls for the current frame have completed. Safe to reference other components here.Render Hooks
These methods are called by the rendering pipeline. They only fire on components attached to the sameGameObject as the relevant Camera, unless noted.
Called by the editor’s gizmo pass. Draw debug shapes and handles for every object in the scene.
Same as
DrawGizmos but only fires when this object is selected in the editor hierarchy.Called for in-game/runtime UI rendering on any camera with a
GUILayer component.The Prowl GUI context for this frame. Use it to issue draw calls and handle input.
Called after the camera attached to this
GameObject has rendered the scene. Implement post-processing effects here. Apply [ImageEffectOpaqueAttribute] to your class to run before transparent geometry.The source render texture containing the rendered scene.
The destination render texture to write the processed image into.
Called right before the camera begins its culling pass.
Called right before the camera starts rendering the scene (after culling).
Called after the camera has finished rendering the scene.
Coroutine API
Coroutines let you spread work across multiple frames without threads, using C#‘sIEnumerator / yield return syntax.
StartCoroutine
Starts a coroutine identified by its method name. The method must returnIEnumerator and take no parameters.
The name of the coroutine method. Leading and trailing whitespace is trimmed. Must exist on the component class (public, private, or protected).
A
Coroutine handle that can be yielded inside another coroutine to wait for completion. Returns null if the method was not found.StopCoroutine
Stops the coroutine with the given method name. Searches all three coroutine queues (regular, end-of-frame, and fixed-update). Has no effect if no coroutine with that name is running.The name of the coroutine method to stop.
StopAllCoroutines
Stops all running coroutines on this component (regular, end-of-frame, and fixed-update queues).Yield Instructions
Use these inside a coroutine’syield return statement to pause execution.
WaitForSeconds
WaitForSeconds
Suspends the coroutine until
Time.time reaches the value of Time.time + seconds at the moment of construction.WaitForEndOfFrame
WaitForEndOfFrame
Resumes the coroutine at the very end of the current frame, after all cameras and GUI have been rendered, just before the frame is presented to the display.
WaitForFixedUpdate
WaitForFixedUpdate
Resumes the coroutine on the next physics fixed-update tick (next call to
SceneManager.PhysicsUpdate).Coroutine (yield another coroutine)
Coroutine (yield another coroutine)
You can yield a
Coroutine handle returned by StartCoroutine to wait until that coroutine finishes.Component API (mirrors GameObject)
MonoBehaviour exposes the full component query API of GameObject as convenience methods so you do not need to write GameObject.GetComponent<T>() everywhere.
- Add / Remove
- Get (single)
- Get (multiple)
- In Parents
- In Children
Messaging
BroadcastMessage delegates to GameObject.BroadcastMessage (this object + all children). SendMessage delegates to GameObject.SendMessage (this object only). CompareTag delegates to GameObject.CompareTag.
Sibling Index
Controls the order of this component within the owningGameObject’s component list. Components are sorted by [ExecutionOrder] on AddComponent, but you can fine-tune with sibling index. Returns null when the component has no owning GameObject.
Attributes
Apply these attributes to yourMonoBehaviour subclass to configure engine behavior.
[AddComponentMenu]
Controls where the component appears in the editor’s Add Component menu.
The menu path, using
/ as separator.[ExecuteAlways]
Makes lifecycle methods (
Update, Awake, etc.) run even when the editor is not in play mode.[ExecutionOrder]
Sets a numeric priority that determines component update order. Lower numbers run first. Default is
0.Execution priority. Negative values run before the default; positive values run after.
[RequireComponent]
Declares component dependencies. Prowl automatically adds missing required types when this component is added to a
GameObject, and prevents removal if a dependent is present.One or more component types that must co-exist on the same
GameObject.Image Effect Attributes
These attributes are applied at the class level to modify the behavior ofOnRenderImage callbacks.
| Attribute | Effect |
|---|---|
[ImageEffectOpaque] | Runs OnRenderImage before the transparent geometry pass. |
[ImageEffectAllowedInSceneView] | The effect is also applied in the editor scene view camera. |
[ImageEffectTransformsToLDR] | Signals that this effect converts the buffer from HDR to LDR. |