io.extendreality.zinnia.unity
Advanced tools
Changelog
2.9.0 (2023-03-28)
It would seem that the behaviour.isActiveAndEnabled property does not always return what is expected. If a GameObject is active and the behaviour is enabled then isActiveAndEnabled can still return false whilst in the OnEnable state.
It would seem that isActiveAndEnabled does not return true until all of the relevant initial Unity moments have passed for an Object.
To counter this, a new BehaviourExtension has been added called
CheckIsActiveAndEnabled()
that will do an absolute check on the GameObject active state and the behaviour enabled state.If the old isActiveAndEnabled check is still required then it can be switched to by a scripting define symbol of:
ZINNIA_USE_ISACTIVEANDENABLED
All of the relevant files that use
isActiveAndEnabled
have now been updated to use the newCheckIsActiveAndEnabled()
extension method.
The new SetPassThrough method will simply call the relevant passthrough method based on the current PassThroughCameraEnabled value.
This is useful if the passthrough camera has turned off due to application pause and needs returning back on when the app is unpaused.
Changelog
2.8.0 (2023-03-21)
The CameraBackgroundMutator allows the ability to mutate a list of cameras clearFlags and backgroundColor state and then to restore the previous data prior to the mutation.
ConstantVelocityTracker is intended to be like the physics Constant Force component. If UseLocal=false, it should return velocity in absolute world space frame. If UseLocal=true, it should return velocity in attached object reference frame.
Co-authored-by: FIGHT4DREAM admin@fight4dream.com
Changelog
2.7.2 (2023-03-16)
The ArtificialVelocityApplier was still applying velocity via the
Apply
method even if the component was disabled.This is because originally it used the
[RequiresBehaviourState]
Malimbe tag but when it was separated out from the process parent, this was not updated when malimbe was removed.This has been fixed now by ensuring the valid state of the object is present before running the
Apply
method.
Changelog
2.7.1 (2023-03-13)
Rigidbodies cannot have velocities set on them if they are kinematic as they are not actually part of the physics simulation when kinematic so this fix just ensures the kinematic state is checked before trying to apply a velocity to a rigidbody.
Changelog
2.7.0 (2023-03-11)
The MomentProcessor component now also implements the IProcessable interface so it can also be processed with a MomentProcess.
This means that multiple MomentProcessors can have their MomentProcess set to
None
meaning they will not be processed in a Unity game moment, but instead can then be added to another MomentProcessor and run in whatever moment that parent processor is using.This allows for greater control over what processes are run amongst different MomentProcessors.
The DeviceDetailsRecord now holds status of whether the device has a passthrough camera and the ability to set the enabled state of the passthrough camera (if supported by the underlying SDK).
The DirectionModifier component now has a new property of PivotRotationMirror which takes a GameObject that will mirror the rotation of the given Pivot GameObject.
This is useful if for instance the follow logic is running on a precision point basis and that precision point object needs to replicate the rotation given by the Pivot.
Changelog
2.6.0 (2023-02-22)
The AnimatorScrubber component allows an animation timeline to be scrubbed through by providing the exact normalized timestamp to jump the animation to.
The AnimatorParameterMutator allows the mutation of parameters assigned to an Animation Controller.
Changelog
2.5.0 (2023-02-19)
The DrawProperty method in the ZinniaInspector has been updated to allow more options such as a custom label and whether to include children.
This has been added as a number of additional methods rather than a single method with overrides to keep compatability.
THe Equality Tolereance has been moved to be the first parameter so the Transition Duration can be used in custom editors with a custom label but not pulling in the
[Header]
tag as that is hard associated with the field in Unity and no easy way to remove it so this is a workaround.
The List component Generator Window was missing a number of elements that made sense to be in the list. These have now been added.
Changelog
2.4.0 (2023-02-08)
There is a new property on the GameObjectCloner that allows defining the name of the cloned object as by default it just gets named as
<current_object_name>(Clone)
which may not be desirable so this allows a simple way of just setting the name at edit time without need for any code.
Previously, the WaitForEndOfFrame and WaitForFixedUpdate YieldEmitters would only yield after one instruction by yielding immediately after the current frame/fixed update.
This feature allows a number of frames to wait before actually calling yield, meaning it is possible to wait n frames or n fixed update loops before yielding.
The ability to provide smoothing data to the TransformPosition/Rotation/Scale property modifiers has now been added by providing a new abstract class that extends the restrictable modifier and provides smoothing settings using SmoothDamp.
A custom Quaternion SmoothDamp algorithm has been added into the Extension namespace to handle smoothing on rotations.
The CountdownTimer component now has a Pause and a Resume method allowing the timer to be paused and then resumed. There are additional events to notify when the timer is paused and resumed.
The deltaTime and WaitForSeconds gets effected by the time scale which can cause the overlay to never fade in or out when timescale is set to approximately 0. Switching to unscaledDeltaTime and WaitForSecondsRealtime will always fade in and out no matter the time scale.
All of the tests that compare vectors or quaternions have now been updated so they no longer use ToString to compare in the Assert.AreEqual as this is not robust enough to always work. Instead they all now use equality comparators.
All of the gameobjects created by the tests now also are named so it is easier to see which test is running and where any cleanup issues may be occurring.
The
UnityEngine.Assertions.Assert
has also been removed from the tests as it is not required.Any test that destroys the
subject
object on teardown has also been updated to not do this as the subject gets destroyed automatically when thecontainingObject
GameObject gets destroyed.
Changelog
2.3.0 (2022-06-16)
The ActionRegistrar now has some events that emit when an Action is added/removed to/from the Target Action sources and an event that denotes the SourceLimit that was used when the Action was added/removed.
The Action now has a SourcesContains method that allows a generic action to be checked if its sources contain a given action.
This is on the base class so can be used regardless of any action typing.
The RemoveSource method also now returns a bool based on the results of the internal
List.Remove
call. This is also now used in the ActionRegistrar to determine if the remove/unregister events should be raised as if no source is removed then no event should be raised.
The Range attribute was missing from the Intensity as it wasn't copied over when the Malimbe removal was done. It has now been readded back.
The size the mesh that is generated for the URP fade was too small causing the edges of the mesh to show the scene behind it.
This has been fixed by making the mesh size much larger.
The code has also been refactored to make it cleaner.
Changelog
2.2.0 (2022-05-20)
The PointsCast.EventData contains RaycastHit information that may be useful to be extracted and then worked upon elsewhere, so this new extractor simply extracts the RaycastHit from the PointsCast EventData.
The GameObjectDestroyer component allows a specified GameObject to be destroyed either immediately or at the end of the frame.
The UnsignedEulerToSignedEuler method was only on the Vector3 extension but it really should be on Vector2 extension as well for completeness as these two extension classes have the same matching methods.
The ActionRule will return true if the set (or given) action is currently activated and will return false if the action is in the deactivated state.
Previously, the CountdownTimer component would rely on the BehaviourEnabledObserver component to let it start the timer when the component became enabled. But the use case for wanting a timer to start when the component is enabled is so common that it may as well simply be an option on the CountdownTimer component itself.
This makes it easier to simply start a timer, but it can also be disabled so the use of the BehaviourEnabledObserver can still be used if required. It is also set to false by default so will not cause any breaking changes.
The RotationUpTarget property can now be set via a method passing the enum index in as the parameter.
The meshesToModify field needs to have the UnityFlag attribute on it otherwise it won't show up the multiple choice enum drop down.