VisitStatus IPropertyVisitor.VisitProperty <TProperty2, TContainer2, TValue2>(TProperty2 property, ref TContainer2 container, ref ChangeTracker changeTracker) { if (Result) { var info = new ContextMemberInfo( ContextFieldInfo.Make(property.GetName()), ContextTypeInfo.MakeProperty(property) ); Result = Visitor(info); } return(VisitStatus.Handled); }
public GameObjectContext(IWatchContext parent, string relativePath, GameObject go, ContextFieldInfo fieldInfo) : base(parent , relativePath , new ContextMemberInfo(fieldInfo, ContextTypeInfo.Make(typeof(GameObjectContext))) ) { GO = go; this.Variables.Add("Components", new GameObjectComponentDictionary(this, ".Components", go, ContextFieldInfo.Make("Components"))); }
public SceneContext(IWatchContext parent, string relativePath, UnityEngine.SceneManagement.Scene scene, ContextFieldInfo fieldInfo) : base(parent , relativePath , new ContextMemberInfo(fieldInfo, ContextTypeInfo.Make(typeof(SceneContext))) ) { Scene = scene; Variables.Add("GameObject", new GameObjectDictionary(this, ParserUtils.MakePathRelative("GameObject"), Scene, ContextFieldInfo.Make("GameObject"))); }
VisitStatus IPropertyVisitor.VisitProperty <TProperty2, TContainer2, TValue2>(TProperty2 property, ref TContainer2 container, ref ChangeTracker changeTracker) { var propName = property.GetName(); if (propName != PropertyIdentifier) { return(VisitStatus.Handled); } if (Result != null) { return(VisitStatus.Handled); } Result = new PropertyPathContext <TContainer, TValue2>(Parent, Root, ParserUtils.MakePathRelative(PropertyPart), Container, RootPath.Appended(PropertyPart), ContextFieldInfo.Make(PropertyPart)); return(VisitStatus.Handled); }