Hello,
I have seen that initialize analytics with an environment that doesn’t exist doesn’t throw any error, i.e
var options = new InitializationOptions();
options.SetEnvironmentName("environment_does_not_exists");
await UnityServices.InitializeAsync(options);//ok
So I wanted to remove all kind of deprecated events that they are not working and they don’t exist anymore, so I was wondering,
could it be possible to remove and create again the same environments to refresh the whole information?
For instance, I have “development” and “production”, I was thinking to remove both of them to have a fresh start.
Other idea is removing and creating again “development”, keep “production”, but create “production_v2”, it is dirtier but maybe safer.
Or, creating again “development” but keeping “production” the way it is and have everything mixed, the old and the new.
Any thoughts?
Hey!
That should work, but to confirm my understanding you’re undergoing this operation to clear up Unity Analytic events you no longer want, correct?
An alternative is also creating a new version of the events (eg myevent_v2).
I’ll raise it up with the team anyway.
Cheers
1 Like
Hey Maeslezo,
Your approach of creating a new environment and deleting unwanted ones is what we’d suggest.
We’re in the process of developing a “Config as Code” set of features of Analytics that should make this a smoother / faster operation.
Appreciate the ping @GabKBelmonte
Hi! Thanks for the answer.
Do you think it will be ok if I remove and create the new environments with the exact name? because I’d like to keep the “development” and “production” naming
So I mean, I remove “production” and I create “production”
It’ll work for any environment except production. So you either create production_2, or deal with new events
.
Be aware that this will work wherever environments are referenced by name, but not by ID. Old remote-config interface comes to mind.
1 Like
Hi Gab,
Our ‘production’ environment had some incorrect parameters and I made a ‘prod’ with the intention of replacing production with it.
Is there no way to un-assign ‘production’ as the default? I only made the new environment after double checking that existing environments could definitely be deleted, but I couldn’t see any documentation re: how untouchable ‘production’ was.

The option to delete a custom event and cloud project solves many headaches.
Please, add this!