C# Class Vexe.Runtime.Types.Requirements

A system that could automatically resolve requirements (dependencies) for your objects using attributes that tell it how to resolve those requirements Annotate your object (System.Object or BetterBehaviour) with [HasRequirements] to let the system know that this object has requirements and needs them resolved The system could be triggered automatically on editor update in a certain interval specified in Startup.ResolveInterval (see below) - defaults to 1 sec or manually (use Tools/Vexe/Requirements to toggle between auto/manual) To resolve requirements manually, you have to collapse the "Script" header foldout of your behavior, and click the resolve button (the button won't appear if your object isn't annotated with HasRequirements) PS: the system picks up serializble members only
Show file Open project: skahal/SpaceInvadersRemake Class Usage Examples

Public Methods

Method Description
Resolve ( object target, GameObject gameObject ) : void
ResolveScene ( ) : void

Resolves the whole scene by getting all BetterBehaviours that are tagged with HasRequirements

Private Methods

Method Description
DontResolve ( object target, GameObject gameObject, RuntimeMember member, Vexe.Runtime.Types.RequiredAttribute attribute ) : UnityObject
ProcessPath ( string path, string memberName ) : string
ResolveFromTargetChildren ( object target, GameObject gameObject, RuntimeMember member, Vexe.Runtime.Types.RequiredAttribute attribute ) : UnityObject
ResolveFromTargetGO ( object target, GameObject gameObject, RuntimeMember member, Vexe.Runtime.Types.RequiredAttribute attribute ) : UnityObject
ResolveFromTargetParents ( object target, GameObject gameObject, RuntimeMember member, Vexe.Runtime.Types.RequiredAttribute attribute ) : UnityObject
ResolveFromTargetRelative ( object target, GameObject gameObject, RuntimeMember member, Vexe.Runtime.Types.RequiredFromRelativeAttribute attribute, GameObject>.Func GetOrAddRelativeAtPath, GameObject>.Func GetRelativeAtPath, Component>.Func GetComponentInRelative ) : UnityObject
ResolveSingle ( object target, GameObject gameObject, RuntimeMember member, Vexe.Runtime.Types.RequiredAttribute attribute ) : UnityObject

Method Details

Resolve() public static method

public static Resolve ( object target, GameObject gameObject ) : void
target object
gameObject UnityEngine.GameObject
return void

ResolveScene() public static method

Resolves the whole scene by getting all BetterBehaviours that are tagged with HasRequirements
public static ResolveScene ( ) : void
return void