protected override void OnItemClicked(UTinyType type)
        {
            var module = ValueToModules[type];

            foreach (var entity in Entities)
            {
                entity.GetOrAddComponent((UTinyType.Reference)type);
            }

            if (!IsIncluded(module))
            {
                Debug.Log($"{UTinyConstants.ApplicationName}: The '{module.Name}' module was included to the project because the '{type.Name}' component was added to an entity.");
            }
            MainModule.AddExplicitModuleDependency((UTinyModule.Reference)module);
            UTinyHierarchyWindow.InvalidateDataModel();
            UTinyInspector.RepaintAll();
        }
Пример #2
0
        protected override void OnItemClicked(UTinyType type)
        {
            var module = ValueToModules[type];

            foreach (var entity in Entities)
            {
                entity.GetOrAddComponent((UTinyType.Reference)type);
            }

            if (!IsIncluded(module))
            {
                Debug.Log($"{UTinyConstants.ApplicationName}: The '{module.Name}' module was included to the project because the '{type.Name}' component was added to an entity.");
            }
            MainModule.AddExplicitModuleDependency((UTinyModule.Reference)module);
            // This is called manually because we want the scene graphs to be recreated.
            UTinyEventDispatcher <ChangeSource> .Dispatch(ChangeSource.DataModel);
        }