View Issue Details

IDProjectCategoryView StatusLast Update
0002304NoesisGUIUnity3Dpublic2022-03-17 21:25
Reporterstonstad Assigned Tojsantos  
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Product Version3.1.3 
Target Version3.1.4Fixed in Version3.1.4 
Summary0002304: Disabled XAML Preview Appears to Affect Runtime Behavior
DescriptionI have preview disabled. However, this code throws an error at runtime if the associated XAML control is selected in the Unity inspector window.

*NoesisXamlEditor:CreatePreviewView *

[NOESIS/E] Child already has a logical parent
UnityEngine.Debug:LogError (object,UnityEngine.Object)
NoesisUnity:UnityLog (int,string) (at C:/Users/stons/Source/StellarConquest/StellarConquest.Utilities/Noesis/3.1.3/Runtime/NoesisUnity.cs:357)
Noesis.View:CreateCPtr (System.Type,bool&) (at C:/Users/stons/Source/StellarConquest/StellarConquest.Utilities/Noesis/3.1.3/Runtime/API/Core/View.cs:535)
Noesis.BaseComponent:.ctor () (at C:/Users/stons/Source/StellarConquest/StellarConquest.Utilities/Noesis/3.1.3/Runtime/API/Proxies/BaseComponentExtend.cs:17)
Noesis.DispatcherObject:.ctor () (at C:/Users/stons/Source/StellarConquest/StellarConquest.Utilities/Noesis/3.1.3/Runtime/API/Proxies/DispatcherObject.cs:30)
Noesis.View:.ctor (System.Runtime.InteropServices.HandleRef) (at C:/Users/stons/Source/StellarConquest/StellarConquest.Utilities/Noesis/3.1.3/Runtime/API/Core/View.cs:519)
Noesis.View:.ctor (Noesis.FrameworkElement) (at C:/Users/stons/Source/StellarConquest/StellarConquest.Utilities/Noesis/3.1.3/Runtime/API/Core/View.cs:492)
Noesis.GUI:CreateView (Noesis.FrameworkElement) (at C:/Users/stons/Source/StellarConquest/StellarConquest.Utilities/Noesis/3.1.3/Runtime/API/Core/NoesisGUI.cs:332)
NoesisXamlEditor:CreatePreviewView () (at C:/Users/stons/Source/StellarConquest/StellarConquest.Utilities/Noesis/3.1.3/Editor/NoesisXamlEditor.cs:30)
NoesisXamlEditor:HasPreviewGUI () (at C:/Users/stons/Source/StellarConquest/StellarConquest.Utilities/Noesis/3.1.3/Editor/NoesisXamlEditor.cs:185)
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)

If I do not have the control selected in the inspector window I do not get this error when playback begins.
Steps To Reproduce1. Create a user control.
2. Disable preview in Noesis settings.
3. Have user control visible in project Unity inspector window prior to Unity playback.
4. Show user control during runtime. Error manifests.

This is not a big deal at all. I am just reporting in case it is helpful.
TagsNo tags attached.
PlatformAny

Activities

stonstad

stonstad

2022-03-09 18:26

reporter  

1.png (86,011 bytes)   
1.png (86,011 bytes)   
2.png (119,413 bytes)   
2.png (119,413 bytes)   
3.png (209,037 bytes)   
3.png (209,037 bytes)   
jsantos

jsantos

2022-03-10 13:13

manager   ~0007853

Thanks for reporting this!
sfernandez

sfernandez

2022-03-17 16:50

manager   ~0007868

Hi,

I found that the Preview is being generated (although not rendered) even if the setting is disabled. We need to fix this behavior.
But I'm not able to reproduce that error. It seems to me that your control may have some global element that gets added to the UI tree when it is loaded, so when you click play and have the preview selected, that global element is added to two different UI trees. Could that be your case?

Issue History

Date Modified Username Field Change
2022-03-09 18:26 stonstad New Issue
2022-03-09 18:26 stonstad File Added: 1.png
2022-03-09 18:26 stonstad File Added: 2.png
2022-03-09 18:26 stonstad File Added: 3.png
2022-03-10 13:12 jsantos Assigned To => jsantos
2022-03-10 13:12 jsantos Status new => assigned
2022-03-10 13:13 jsantos Target Version => 3.1.4
2022-03-10 13:13 jsantos Note Added: 0007853
2022-03-17 16:50 sfernandez Status assigned => feedback
2022-03-17 16:50 sfernandez Note Added: 0007868
2022-03-17 21:25 sfernandez Status feedback => resolved
2022-03-17 21:25 sfernandez Resolution open => fixed
2022-03-17 21:25 sfernandez Fixed in Version => 3.1.4