コード例 #1
0
 static void AddSystemAndLogException(World world, ComponentSystemGroup group, Type type)
 {
     try
     {
         group.AddSystemToUpdateList(world.GetOrCreateSystem(type));
     }
     catch (Exception e)
     {
         Debug.LogException(e);
     }
 }
コード例 #2
0
        static void AddSystemAndLogException(World world, ComponentSystemGroup group, Type type)
        {
            try
            {
                var system = world.GetOrCreateSystem(type);
#if UNITY_EDITOR
                if (system is GameObjectConversionSystem conversionSystem)
                {
                    // TODO we should log all conversion systems and their enabled/disabled state
                    system.Enabled = conversionSystem.ShouldRunConversionSystem();
                }
#endif
                group.AddSystemToUpdateList(system);
            }
            catch (Exception e)
            {
                Debug.LogException(e);
            }
        }