sericaer
Topic Author
Posts: 13
Joined: 09 Oct 2021, 09:29

Unity Report error: Unknown type 'Array'

21 Mar 2023, 15:22

Unity Report error: Unknown type 'Array', Is NoesisGUI not support Array?
        <x:Array x:Key="stringArray" Type="sys:String">
            <sys:String>Bear</sys:String>
            <sys:String>Bird</sys:String>
            <sys:String>Cat</sys:String>
        </x:Array>
    </UserControl.Resources>

    <ListBox ItemsSource="{Binding Source={StaticResource stringArray}}">

    </ListBox>
[NOESIS/E] Assets/Scenes/MainScene/MainScene.xaml(30): Unknown type 'Array'.
UnityEngine.Debug:LogError (object,UnityEngine.Object)
NoesisUnity:UnityLog (int,string) (at Packages/NoesisGUI-Unity-3.1.6-Indie/Runtime/NoesisUnity.cs:357)
Noesis.GUI:LoadComponent (object,string) (at Packages/NoesisGUI-Unity-3.1.6-Indie/Runtime/API/Core/NoesisGUI.cs:326)
NoesisUnity:LoadComponent (object,string) (at Packages/NoesisGUI-Unity-3.1.6-Indie/Runtime/NoesisUnity.cs:270)
JiangH.MainScene:InitializeComponent () (at Assets/Scenes/MainScene/MainScene.xaml.cs:31)
JiangH.MainScene:.ctor () (at Assets/Scenes/MainScene/MainScene.xaml.cs:20)
(wrapper dynamic-method) object:lambda_method (System.Runtime.CompilerServices.Closure)
Noesis.Extend:CreateInstance (intptr,intptr) (at Packages/NoesisGUI-Unity-3.1.6-Indie/Runtime/API/Core/Extend.cs:5483)
Noesis.GUI:LoadXaml (System.IO.Stream,string) (at Packages/NoesisGUI-Unity-3.1.6-Indie/Runtime/API/Core/NoesisGUI.cs:274)
NoesisXaml:Load () (at Packages/NoesisGUI-Unity-3.1.6-Indie/Runtime/NoesisXaml.cs:17)
NoesisView:LoadXaml (bool) (at Packages/NoesisGUI-Unity-3.1.6-Indie/Runtime/NoesisView.cs:489)
NoesisView:OnEnable () (at Packages/NoesisGUI-Unity-3.1.6-Indie/Runtime/NoesisView.cs:623)
 
User avatar
sfernandez
Site Admin
Posts: 3033
Joined: 22 Dec 2011, 19:20

Re: Unity Report error: Unknown type 'Array'

27 Mar 2023, 16:40

Hi, the x:Array is not supported by Noesis (#668). We didn't implement it as it seemed a thing only for testing purposes but not for real production scenarios. How do you plan to use it?

I haven't thought much about it, but maybe we can implement it as a generic collection with boxed objects.

Who is online

Users browsing this forum: No registered users and 6 guests