Esempio n. 1
0
 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")));
 }
Esempio n. 2
0
            VisitStatus IPropertyVisitor.VisitCollectionProperty <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.AppendedIndexer(PropertyPart), ContextFieldInfo.MakeOperator(PropertyPart));
                return(VisitStatus.Handled);
            }