Exemplo n.º 1
0
        public void UpdateReferences()
        {
            ExposedLogger.Info(name + " - updating references", this);
            var componentObtainer = ExposedApplicationDi.Instance.Container.Resolve <IComponentObtainer>();
            var fieldsProcessor   = ExposedApplicationDi.Instance.Container.Resolve <IFieldsProcessor>();
            var fieldsObtainer    = ExposedApplicationDi.Instance.Container.Resolve <IFieldsObtainer>();

            List <ExposedMapping> scriptMappings = componentObtainer.GetComponentMappingsOnSameGameObject(this);

            //Debug.LogError(gameObject, gameObject);
            foreach (var scriptMapping in scriptMappings)
            {
                ExposedConfiguration configuration = GetConfigForScript(scriptMapping.AffectedComponent);
                if (configuration != null)
                {
                    List <FieldInfo> fields = fieldsObtainer.GetReferenceFieldsForType(scriptMapping.Type);
                    fieldsProcessor.ProcessFieldsForType(fields, scriptMapping.AffectedComponent, configuration);
                }
            }
        }
Exemplo n.º 2
0
 public void SetConfigForScriptObject(Component component, ExposedConfiguration configuration)
 {
     _properties[component] = configuration;
 }