Skip to content

1.20.0

Choose a tag to compare

@cs-util cs-util released this 22 Jun 08:54
· 43 commits to master since this release

This release introduces several enhancements and fixes, focusing on improving ECS (Entity Component System) functionality, optimizing Unity GameObject handling, and refining logging and profiling capabilities. Key changes include adding new ECS-related classes and methods, improving GameObject extensions, and enhancing profiling tools for Unity

ECS Enhancements:

  • Added EntityView class to provide access to the model from other components/views associated with the entity. Includes debug support for Unity Editor. (CsCoreUnity/com/csutil/model/ecs/EntityView.cs, EntityView.cs.meta) [1] [2]
  • Introduced IEcsComponentDestroyHandler interface for managing component destruction behavior in ECS presenters. (CsCoreUnity/com/csutil/model/ecs/IEcsComponentDestroyHandler.cs, IEcsComponentDestroyHandler.cs.meta) [1] [2]
  • Enhanced UnityEcsPresenter to debounce updates, cache old states, and delay presenter creation for stable model states. (CsCoreUnity/com/csutil/model/ecs/UnityEcsPresenter.cs) [1] [2] [3] [4]

GameObject Extensions:

  • Added methods to retrieve components from ECS presenter children, allowing filtered searches based on entity data. (CsCoreUnity/com/csutil/model/ecs/GameObjectEcsExtensions.cs, GameObjectEcsExtensions.cs.meta) [1] [2]
  • Improved GetComponentV2 and GetComponentInChildrenV2 to optionally throw exceptions when components are not found. (CsCoreUnity/com/csutil/extensions/GameObjectExtensions.cs)

Profiling and Logging Improvements:

  • Added thread profiling and timing tracking methods to LogToUnityDebugLog, leveraging Unity's Profiler and CustomSampler. (CsCoreUnity/com/csutil/logging/LogToUnityDebugLog.cs) [1] [2]

Miscellaneous Updates:

  • Enhanced PoseExtensionsForUnity to avoid redundant transform updates and added assertions for model and presenter synchronization. (CsCoreUnity/com/csutil/model/ecs/PoseExtensionsForUnity.cs)
  • Modified JSON loading methods to use custom readers where applicable. (UnityPackageInstaller.cs, PersistedImageRegression.cs) [1] [2]

These changes collectively improve the functionality, performance, and maintainability of the ECS system and Unity integration in the CsCoreUnity project.

Most relevant commits:

  • 5e46769 Improved error logging of Unity presenters of ECS system and introduced some new stack trace helper logic for this
  • c70f51d Now that not every component must have a unity presenter take this into account when components are updated
  • c02ff69 Introduced a IEcsComponentDestroyHandler for customer handling of ECS presenter resets (instead of destroying the presenter)
  • 206ca10 Improved GetSubStateForUnity to not trigger updates to all children substrates by default if the used Unity context object is not active and enabled
  • 0fe6068 Added helper method that can be used for (almost) unique seeds in the ECS system
  • 906fc2a Smaller improvements on ECS pose math
  • ad5361d Improved Pose3d helper method to apply a new pose to a target transform
  • 17e4dfe Improvements on how presenter components are found in the ecs system
  • b29df2c In the unity editor the entity field in the entity view can be inspected now
  • 54ed157 Added helper method to generate OpenStreetmap links for an input latitude/longitude pair (similar to the google maps link generation)
  • 6586913 Added helper method variant for GPS math
  • fafcf48 Now its possible for a component to listen to its parent entities create event in the ECS
  • e0091db Usability and performance Improvements to the ecs CollectAllParents method
  • e4f7178 Adding changes from https://openai.com/index/introducing-structured-outputs-in-the-api/
  • 15dd495 Improved the variant creation to only inform the entity added listeners after the entire variant subtree was created
  • 2edc2ce Update to news manager types to add one for app updates and one for outage announcements
  • cb522f0 Added missing Assert.IsAssignableFrom method for XUnit Assert Polyfill in Unity
  • 7bfa3eb Some more helper methods added that work on the IEntityData
  • d4a470b Non breaking change / fallback to variant creation for cases where the template save io logic was not done yet persisting the template
  • 918d42c Added example api usage for github public rest apis
  • 8c7d12f Improved AssertV3 to be usable to compare strings better for equality
  • fc34ae6 Smaller improvements to REST error handling
  • f3aec34 Only updating state on disc if ecs update detects any real changes
  • cacecb3 Allow subclasses to call entity added event logic
  • 30a1f46 Improved google sheet download logic based on observations of their api behavior
  • 1cf2323 Renaming ChatGpt.Line to ChatGpt.Message
  • ec53321 Added text to speech example via the completions api to include instructions how the generated audio should sound like (Idea from https://minimaxir.com/2024/10/speech-prompt-engineering/ )
  • 17deca3 Deprecated datetime.ToReadableString since its too easy to use it incorrectly and it also only can return utl strings
  • 64fcb67 Removed stack overflow search util since it no longer works without being authenticated
  • ef28719 Fixed bug in xml logic to not try to access position if stream not seekable
  • 9fb7faf Improved template io system to not create a new serializer with every save request
  • c4cb891 Prepared more explicit usage of json reader and writer instances
  • 401c608 Using normal non-typed json in persisted regression system again to keep it simpler to use
  • bce7922 Allow reading from settings of json net reader
  • 857b3d9 Improvements to ECS presenter update logic to use a debouncing approach to reduce load on the Unity scene
  • b9d8cad Changing default behavior of sprite generation from texture2d to not do any SpriteMeshGenerator.TraceShape and SpriteMeshGenerator.Simplify optimizations by using SpriteMeshType.FullRect instead of any shape tracing
  • ef61330 Improved ecs presenter update interval to avoid bugs due to slow model changes => invalid intermediate state
  • 7cc8aab Important fix for unnecessary StackTrace creation in Assert method even if Assert does not fail
  • 1fbd2fe Introduced a new slightly faster CalcEntryChangesToOldStateV3 for dictionaries that produces less memory garbage
  • 8cd4114 Logging improvements when running xUnit tests inside of unity
  • e16a463 Introduced new Log.TrackTiming method to profile background thread performance in the Unity profiler
  • a526453 New quaternion helpers added
  • 8cd29de Introduced a new improved task queue that uses SemaphoreSlim to control concurrency
  • ea088f1 Renamed new task concept used in TemplatesIO to ExpensiveRegularAsyncTaskInBackground
  • 43237b1 Helper to make it easier to skip ui actions when there is still an ongoing async task
  • 3094c44 Changed LogOnError signature a bit so that it can be used without the need to await it
  • 21f7f3f Added ElevenLabs api endpoints for simple high quality text to speech

All changes can be seen here:
v1.10.0...v1.20.0