Instancing
Some scenes make use of a paradigm dubbed Instancing. In most cases, when swapping between instances, the developer iterates through the entities in the scene and removes the entities not needed for the next instance, or those being used in the transition.
The best practice to maintain stable analytics when switching instances is to let the atlasAnalytics entity persist when changing instances. In order to help the developer during scene deletion, we've created a custom component called AtlasAnalyticsFlag that is added to the atlasAnalytics entity during instantiation that allows it to be identified in downstream business logic.
In addition, we've provided a function within the AtlasAnalytics class called updateBranchName that can be used to tag the analytics going foward with the name of the new instance.
Here is an example of code that is representative of deleting all of the entities from the scene when changing instances and how to maintain stable analytics.
Last updated