Giter VIP home page Giter VIP logo

Comments (4)

XuToWei avatar XuToWei commented on July 26, 2024

能发一下报错信息吗?

from gamedevelopmentkit.

cxg83843652 avatar cxg83843652 commented on July 26, 2024

================================第一个报错===================================
GameFramework.GameFrameworkException: Entity is invalid.
at GameFramework.Entity.EntityManager.HideEntity (GameFramework.Entity.IEntity entity, System.Object userData) [0x0000a] in /Users//Downloads/GameDevelopmentKit-2.0-WithDemo/Unity/Assets/Scripts/Library/UGF/GameFramework/Entity/EntityManager.cs:708
at GameFramework.Entity.EntityManager.HideEntity (GameFramework.Entity.IEntity entity) [0x00001] in /Users/
/Downloads/GameDevelopmentKit-2.0-WithDemo/Unity/Assets/Scripts/Library/UGF/GameFramework/Entity/EntityManager.cs:696
at UnityGameFramework.Runtime.EntityComponent.HideEntity (UnityGameFramework.Runtime.Entity entity) [0x00001] in /Users//Downloads/GameDevelopmentKit-2.0-WithDemo/Unity/Assets/Scripts/Library/UGF/UnityGameFramework/Runtime/Entity/EntityComponent.cs:522
at ET.Client.EntityComponentSystem.HideEntity (ET.Client.EntityComponent self, ET.UGFEntity entity) [0x00001] in /Users/
/Downloads/GameDevelopmentKit-2.0-WithDemo/Unity/Assets/Scripts/Game/ET/Code/HotfixView/Client/Module/Entity/EntityComponentSystem.cs:48
at ET.Client.EntityComponentSystem.HideAllEntities (ET.Client.EntityComponent self) [0x00017] in /Users//Downloads/GameDevelopmentKit-2.0-WithDemo/Unity/Assets/Scripts/Game/ET/Code/HotfixView/Client/Module/Entity/EntityComponentSystem.cs:60
at ET.Client.EntityComponentSystem+EntityComponentDestroySystem.Destroy (ET.Client.EntityComponent self) [0x00001] in /Users/
/Downloads/GameDevelopmentKit-2.0-WithDemo/Unity/Assets/Scripts/Game/ET/Code/HotfixView/Client/Module/Entity/EntityComponentSystem.cs:26
at ET.DestroySystem1[T].ET.IDestroySystem.Run (ET.Entity o) [0x00001] in /Users/******/Downloads/GameDevelopmentKit-2.0-WithDemo/Unity/Assets/Scripts/Library/ET/Runtime/Core/Module/EventSystem/IDestroySystem.cs:19 at ET.EntitySystemSingleton.Destroy (ET.Entity component) [0x00067] in /Users/******/Downloads/GameDevelopmentKit-2.0-WithDemo/Unity/Assets/Scripts/Library/ET/Runtime/Core/Module/EventSystem/EntitySystemSingleton.cs:360 UnityEngine.Debug:LogError (object) ET.UnityLogger:Error (string) (at Assets/Scripts/Game/ET/Loader/UnityLogger.cs:29) ET.Logger:Error (System.Exception) (at Assets/Scripts/Library/ET/Runtime/Core/Module/Log/Logger.cs:94) ET.Log:Error (System.Exception) (at Assets/Scripts/Library/ET/Runtime/Core/Module/Log/Log.cs:38) ET.EntitySystemSingleton:Destroy (ET.Entity) (at Assets/Scripts/Library/ET/Runtime/Core/Module/EventSystem/EntitySystemSingleton.cs:364) ET.Entity:Dispose () (at Assets/Scripts/Library/ET/Runtime/Core/Module/Entity/Entity.cs:506) ET.Entity:Dispose () (at Assets/Scripts/Library/ET/Runtime/Core/Module/Entity/Entity.cs:484) ET.Scene:Dispose () (at Assets/Scripts/Library/ET/Runtime/Core/Module/Entity/Scene.cs:45) ET.Entity:Dispose () (at Assets/Scripts/Library/ET/Runtime/Core/Module/Entity/Entity.cs:460) ET.Entity:Dispose () (at Assets/Scripts/Library/ET/Runtime/Core/Module/Entity/Entity.cs:484) ET.Scene:Dispose () (at Assets/Scripts/Library/ET/Runtime/Core/Module/Entity/Scene.cs:45) ET.Entity:Dispose () (at Assets/Scripts/Library/ET/Runtime/Core/Module/Entity/Entity.cs:460) ET.Entity:Dispose () (at Assets/Scripts/Library/ET/Runtime/Core/Module/Entity/Entity.cs:484) ET.Scene:Dispose () (at Assets/Scripts/Library/ET/Runtime/Core/Module/Entity/Scene.cs:45) ET.Root:Dispose () (at Assets/Scripts/Library/ET/Runtime/Core/Module/Entity/Root.cs:16) ET.Singleton1<ET.Root>:ET.ISingleton.Destroy () (at Assets/Scripts/Library/ET/Runtime/Core/Singleton/Singleton.cs:43)
ET.Game:Close () (at Assets/Scripts/Library/ET/Runtime/Core/Singleton/Game.cs:163)
ET.Init/Runner:OnDestroy () (at Assets/Scripts/Game/ET/Loader/Init.cs:33)
UnityEngine.Object:DestroyImmediate (UnityEngine.Object)
ET.Init:OnDestroy () (at Assets/Scripts/Game/ET/Loader/Init.cs:66)
UnityEngine.Object:DestroyImmediate (UnityEngine.Object)
Game.CodeRunnerComponent:Shutdown () (at Assets/Scripts/Game/CodeRunner/CodeRunnerComponent.cs:62)
Game.ProcedureET:OnLeave (GameFramework.Fsm.IFsm1<GameFramework.Procedure.IProcedureManager>,bool) (at Assets/Scripts/Game/Procedure/ProcedureET.cs:18) GameFramework.Fsm.Fsm1<GameFramework.Procedure.IProcedureManager>:Clear () (at Assets/Scripts/Library/UGF/GameFramework/Fsm/Fsm.cs:220)
GameFramework.ReferencePool/ReferenceCollection:Release (GameFramework.IReference) (at Assets/Scripts/Library/UGF/GameFramework/Base/ReferencePool/ReferencePool.ReferenceCollection.cs:131)
GameFramework.ReferencePool:Release (GameFramework.IReference) (at Assets/Scripts/Library/UGF/GameFramework/Base/ReferencePool/ReferencePool.cs:118)
GameFramework.Fsm.Fsm1<GameFramework.Procedure.IProcedureManager>:Shutdown () (at Assets/Scripts/Library/UGF/GameFramework/Fsm/Fsm.cs:553) GameFramework.Fsm.FsmManager:InternalDestroyFsm (GameFramework.TypeNamePair) (at Assets/Scripts/Library/UGF/GameFramework/Fsm/FsmManager.cs:404) GameFramework.Fsm.FsmManager:DestroyFsm<GameFramework.Procedure.IProcedureManager> (GameFramework.Fsm.IFsm1<GameFramework.Procedure.IProcedureManager>) (at Assets/Scripts/Library/UGF/GameFramework/Fsm/FsmManager.cs:365)
GameFramework.Procedure.ProcedureManager:Shutdown () (at Assets/Scripts/Library/UGF/GameFramework/Procedure/ProcedureManager.cs:92)
GameFramework.GameFrameworkEntry:Shutdown () (at Assets/Scripts/Library/UGF/GameFramework/Base/GameFrameworkEntry.cs:40)
UnityGameFramework.Runtime.BaseComponent:OnDestroy () (at Assets/Scripts/Library/UGF/UnityGameFramework/Runtime/Base/BaseComponent.cs:244)

========================================第二个=======================================================

Entity '[-1]Assets/Res/Entity/PlayerShip.prefab' OnHide with exception 'System.NullReferenceException: Object reference not set to an instance of an object
at ET.Client.AUGFEntityEvent.OnHide (ET.UGFEntity entity, System.Boolean isShutdown, System.Object userData) [0x00001] in /Users//Downloads/GameDevelopmentKit-2.0-WithDemo/Unity/Assets/Scripts/Game/ET/Code/ModelView/Client/Module/Entity/AUGFEntityEvent.cs:24
at ET.ETMonoEntity.OnHide (System.Boolean isShutdown, System.Object userData) [0x00001] in /Users/
/Downloads/GameDevelopmentKit-2.0-WithDemo/Unity/Assets/Scripts/Game/ET/Loader/UGF/Entity/ETMonoEntity.cs:80
at UnityGameFramework.Runtime.Entity.OnHide (System.Boolean isShutdown, System.Object userData) [0x00002] in /Users/******/Downloads/GameDevelopmentKit-2.0-WithDemo/Unity/Assets/Scripts/Library/UGF/UnityGameFramework/Runtime/Entity/Entity.cs:183 '.
UnityEngine.Debug:LogError (object)
UnityGameFramework.Runtime.DefaultLogHelper:Log (GameFramework.GameFrameworkLogLevel,object) (at Assets/Scripts/Library/UGF/UnityGameFramework/Runtime/Utility/DefaultLogHelper.cs:40)
GameFramework.GameFrameworkLog:Error<int, string, System.Exception> (string,int,string,System.Exception) (at Assets/Scripts/Library/UGF/GameFramework/Base/Log/GameFrameworkLog.cs:1677)
UnityGameFramework.Runtime.Log:Error<int, string, System.Exception> (string,int,string,System.Exception) (at Assets/Scripts/Library/UGF/UnityGameFramework/Runtime/Utility/Log.cs:1679)
UnityGameFramework.Runtime.Entity:OnHide (bool,object) (at Assets/Scripts/Library/UGF/UnityGameFramework/Runtime/Entity/Entity.cs:187)
GameFramework.Entity.EntityManager:InternalHideEntity (GameFramework.Entity.EntityManager/EntityInfo,object) (at Assets/Scripts/Library/UGF/GameFramework/Entity/EntityManager.cs:1219)
GameFramework.Entity.EntityManager:HideAllLoadedEntities (object) (at Assets/Scripts/Library/UGF/GameFramework/Entity/EntityManager.cs:732)
GameFramework.Entity.EntityManager:HideAllLoadedEntities () (at Assets/Scripts/Library/UGF/GameFramework/Entity/EntityManager.cs:719)
GameFramework.Entity.EntityManager:Shutdown () (at Assets/Scripts/Library/UGF/GameFramework/Entity/EntityManager.cs:193)
GameFramework.GameFrameworkEntry:Shutdown () (at Assets/Scripts/Library/UGF/GameFramework/Base/GameFrameworkEntry.cs:40)
UnityGameFramework.Runtime.BaseComponent:OnDestroy () (at Assets/Scripts/Library/UGF/UnityGameFramework/Runtime/Base/BaseComponent.cs:244)

from gamedevelopmentkit.

cxg83843652 avatar cxg83843652 commented on July 26, 2024

Generator 创建的 Entity 我需要使用一个 UGFEntityEventAttribute 的特性标记 并且 Assets/Scripts/Game/ET/Loader/UGF/UGFEventComponent.cs 中需要修改为

       HashSet<Type> types = EventSystem.Instance.GetTypes(typeof(UGFEntityEventAttribute));
            foreach (Type type in types)
            {
     
                IUGFEntityEvent ugfEntityEvent = Activator.CreateInstance(type) as IUGFEntityEvent;
                this.EntityEvents.Add(type, ugfEntityEvent);
            }

因为创建的脚本用原来的代码识别不到

from gamedevelopmentkit.

XuToWei avatar XuToWei commented on July 26, 2024

已修复 66d4655

from gamedevelopmentkit.

Related Issues (7)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.