C# Класс 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
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
Resolve ( object target, GameObject gameObject ) : void
ResolveScene ( ) : void

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

Приватные методы

Метод Описание
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

Описание методов

Resolve() публичный статический Метод

public static Resolve ( object target, GameObject gameObject ) : void
target object
gameObject UnityEngine.GameObject
Результат void

ResolveScene() публичный статический Метод

Resolves the whole scene by getting all BetterBehaviours that are tagged with HasRequirements
public static ResolveScene ( ) : void
Результат void