1 (edited by nigel.moore 2017-01-19 09:48:21)

Topic: Destroying assets is not permitted ...

Hi Alex,

I have recently come across a problem with tileset maps in Unity 5.5 - Windows 10.
I get this error in the console -

Destroying assets is not permitted to avoid data loss.
If you really want to remove an asset use DestroyImmediate (theObject, true);
UnityEngine.Object:DestroyImmediate(Object)
OnlineMapsUtils:DestroyImmediate(Object) (at Assets/Infinity Code/Online maps/Scripts/Core/OnlineMapsUtils.cs:279)
OnlineMapsTile:Destroy() (at Assets/Infinity Code/Online maps/Scripts/Core/OnlineMapsTile.cs:425)
OnlineMapsTile:UnloadUnusedTiles() (at Assets/Infinity Code/Online maps/Scripts/Core/OnlineMapsTile.cs:661)
OnlineMaps:CheckBufferComplete() (at Assets/Infinity Code/Online maps/Scripts/OnlineMaps.cs:852)
OnlineMaps:LateUpdate() (at Assets/Infinity Code/Online maps/Scripts/OnlineMaps.cs:1101)

Any idea whats going on here?

I upgraded my OnlineMaps asset to the latest from the asset store by the way.

Thanks

Re: Destroying assets is not permitted ...

Hello.

This happens when you (map, anyone) trying to destroy the object that is loaded (for example, from the Resources) without Instantiate.
I checked Online Maps and was unable to reproduce the problem.
Perhaps your scripts loads tile.texture?!

How to fix it:
Change in «OnlineMapsUtils.DestroyImmediate»
UnityEngine.Object.DestroyImmediate (obj);
to
UnityEngine.Object.Destroy (obj);

In the next version we will also add this fix.

Kind Regards,
Infinity Code Team.

Boost your productivity a lot and immediately using Ultimate Editor Enhancer. Trial and non-commerce versions available.

Re: Destroying assets is not permitted ...

Seem to be having a similar issue, not resolved by the change to destroy as suggested.

Also having trouble loading tile overlays (see attached image, only 3 tiles are loaded). Any ideas?

Using version 2.5.9.1

screenshot

Re: Destroying assets is not permitted ...

Hello.

Please attach a stack trace of this error.

Kind Regards,
Infinity Code Team.

Boost your productivity a lot and immediately using Ultimate Editor Enhancer. Trial and non-commerce versions available.