1 (edited by philzmz 2021-09-25 06:32:03)

Topic: "Destroying assets is not permitted to avoid data loss" ???

Hello,

I get a strange error in play mode and unity pauses.
In the build mode, no message, but the material turns to black.
I read an answer relative to this error message in the forum, but concerning OLMaps.
This is very strange, as I already used this PM Action dozens of times with no issue.

When Unity enters pause mode, I get this message 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:Destroy (UnityEngine.Object)
InfinityCode.uPano.Renderers.Base.SingleTexturePanoRenderer`1<InfinityCode.uPano.Renderers.SphericalPanoRenderer>:set_texture (UnityEngine.Texture) (at Assets/Plugins/Infinity Code/uPano/Scripts/Renderers/Base/SingleTexturePanoRenderer.cs:34)
System.Reflection.PropertyInfo:SetValue (object,object,object[])
HutongGames.PlayMaker.ReflectionUtils:SetMemberValue (System.Reflection.MemberInfo,object,object) (at C:/Projects/Playmaker_1.9.0/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/ReflectionUtils.cs:335)
HutongGames.PlayMaker.ReflectionUtils:SetMemberValue (System.Reflection.MemberInfo[],object,object) (at C:/Projects/Playmaker_1.9.0/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/ReflectionUtils.cs:366)
HutongGames.PlayMaker.FsmProperty:SetValue () (at C:/Projects/Playmaker_1.9.0/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/FsmProperty.cs:351)
HutongGames.PlayMaker.Actions.SetProperty:OnEnter () (at Assets/PlayMaker/Actions/UnityObject/SetProperty.cs:26)
HutongGames.PlayMaker.FsmState:ActivateActions (int) (at C:/Projects/Playmaker_1.9.0/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/FsmState.cs:205)
HutongGames.PlayMaker.FsmState:OnEnter () (at C:/Projects/Playmaker_1.9.0/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/FsmState.cs:175)
HutongGames.PlayMaker.Fsm:EnterState (HutongGames.PlayMaker.FsmState) (at C:/Projects/Playmaker_1.9.0/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/Fsm.cs:2771)
HutongGames.PlayMaker.Fsm:SwitchState (HutongGames.PlayMaker.FsmState) (at C:/Projects/Playmaker_1.9.0/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/Fsm.cs:2718)
HutongGames.PlayMaker.Fsm:UpdateStateChanges () (at C:/Projects/Playmaker_1.9.0/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/Fsm.cs:2643)
HutongGames.PlayMaker.Fsm:Start () (at C:/Projects/Playmaker_1.9.0/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/Fsm.cs:1926)
PlayMakerFSM:Start () (at C:/Projects/Playmaker_1.9.0/Projects/Playmaker.source.unity/Assets/PlayMaker/PlayMakerFSM.cs:563)

Then if I press play again, a message is displayed lot of times
NullReferenceException: Object reference not set to an instance of an object
InfinityCode.uPano.Renderers.Base.PanoRenderer.GetPanTiltByScreenPosition (UnityEngine.Vector2 screenPoint, System.Single& pan, System.Single& tilt) (at Assets/Plugins/Infinity Code/uPano/Scripts/Renderers/Base/PanoRenderer.cs:182)
InfinityCode.uPano.Renderers.Base.PanoRenderer.GetPanTiltUnderCursor (System.Single& pan, System.Single& tilt) (at Assets/Plugins/Infinity Code/uPano/Scripts/Renderers/Base/PanoRenderer.cs:215)
InfinityCode.uPano.Controls.MouseControl.Drag (System.Boolean& changed) (at Assets/Plugins/Infinity Code/uPano/Scripts/Controls/MouseControl.cs:108)
InfinityCode.uPano.Controls.MouseControl.Update () (at Assets/Plugins/Infinity Code/uPano/Scripts/Controls/MouseControl.cs:218)

If this can help, I have to mention that :
- my project has 2 scenes, each with 1 Upano
- The project is for VR with XR (Oculus Quest2)

Any help mostly welcome as I spent several hours trying to solve this problem with no result.
Thanks, Philippe

Re: "Destroying assets is not permitted to avoid data loss" ???

Hello.

Thanks for the bug report.
A major update to uPano (v3) is planned for next week, and I will try to make sure that it contains a fix for this issue.

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 to avoid data loss" ???

Hello Alex.
Thanks for the answer, I am very impatient to see the new features of the V3. If you need a beta tester don't hesitate. I found a workaround for the  issue, using another sphere with an inside shader and it works fine.
Best regards.
Philippe