Code Monkey home page Code Monkey logo

swissarmylib's People

Contributors

phault avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

swissarmylib's Issues

Event / GlobalEvents Priority Performance Issue

Allo,

Thanks for putting this together. I noticed large memory and performance issues using delegates & events so I decided to give the SwissArmyLib interface approach a shot. After implementing the latest stable release (1.0.56), I noticed a large CPU issue with the new event code.

I used the Deep Profiler to figure out what the issue was and it pointed me towards the Equals comparer being called 750,000~ times. Here's a screenshot from the profiler:

skytropolis--load-from-save-deep-profile3

After ripping out the priority code (which our game doesn't require) performance is as smooth as silk. ๐Ÿ˜„

Prewarming GameObject pool doesn't disable spawned objects

As title states, if i create a GameObjectPool, and call .Prewarm on it, objects get instantiated, but they are not getting disabled. This makes the GameObjectPool with limited use for using on things such as rapid weapon firing, as the pool would need to get warmed up, and hence stutter while firing first rounds.

ServiceLocator - Multi-scene; Throws UnityException when recompiling while the game is running.

  1. Error
    INTERNAL_CALL_GetActiveScene is not allowed to be called from a MonoBehaviour constructor (or instance field initializer), call it in Awake or Start instead. Called from MonoBehaviour 'ManagedUpdate' on game object 'ServiceLocator - Multi-scene'. See "Script Serialization" page in the Unity Manual for further details. UnityEngine.SceneManagement.SceneManager:GetActiveScene() Archon.SwissArmyLib.Utils.ServiceLocator:.cctor() (at C:/jenkins/workspace/SwissArmyLib/Archon.SwissArmyLib/Utils/ServiceLocator.cs:42) Archon.SwissArmyLib.Events.ManagedUpdate:.cctor() (at C:/jenkins/workspace/SwissArmyLib/Archon.SwissArmyLib/Events/ManagedUpdate.cs:63) Archon.SwissArmyLib.Events.ManagedUpdate:.cctor() (at C:/jenkins/workspace/SwissArmyLib/Archon.SwissArmyLib/Events/ManagedUpdate.cs:58)

  2. Error
    UnityException: INTERNAL_CALL_GetActiveScene is not allowed to be called from a MonoBehaviour constructor (or instance field initializer), call it in Awake or Start instead. Called from MonoBehaviour 'ManagedUpdate' on game object 'ServiceLocator - Multi-scene'. See "Script Serialization" page in the Unity Manual for further details. UnityEngine.SceneManagement.SceneManager.GetActiveScene () (at C:/buildslave/unity/build/artifacts/generated/common/runtime/SceneManagerBindings.gen.cs:37) Archon.SwissArmyLib.Utils.ServiceLocator..cctor () (at C:/jenkins/workspace/SwissArmyLib/Archon.SwissArmyLib/Utils/ServiceLocator.cs:42) Rethrow as TypeInitializationException: An exception was thrown by the type initializer for Archon.SwissArmyLib.Utils.ServiceLocator Archon.SwissArmyLib.Events.ManagedUpdate..cctor () (at C:/jenkins/workspace/SwissArmyLib/Archon.SwissArmyLib/Events/ManagedUpdate.cs:58) Rethrow as TypeInitializationException: An exception was thrown by the type initializer for Archon.SwissArmyLib.Events.ManagedUpdate

Reproduce:

  1. Start the game in the editor
  2. Change some code and save.
  3. Wait for recompilation.

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.