NoesisGUI - XAML File Not Found in Unity3D
April 25, 2021
• 355 views
NoesisNoesisGUIUnityUnity2DUnity3DGame DevelopmentGamedevProgrammingXAMLWPFAssetsExceptionFileNotFoundExceptionUnity EditorUnity Enginenoesis guinoesis gui tutorialnoesisguixamlnoesisnoesisgui unitynoesis xamlnoesis tutorialgame devnoesis wpfnoesis enginegamedevnoesisgui tutorialnoesis gui tutorialsnoesis examplewpfunity gui noesisnoesis gui unityunity uigame developmentunity noesisdotnetxaml formatvisual studio xaml
Are you working with NoesisGUI in Unity3D? You may have run into this troubling little situation and lost a good amount of time on it just like me! Don't worry though, the solution is really simple once you recognize the error that's happening.
My Social:
LinkedIn: https://www.linkedin.com/in/nickcosentino
Blog: http://www.devleader.ca/
GitHub: https://github.com/ncosentino/
Twitch: https://www.twitch.tv/ncosentino
Twitter: https://twitter.com/nbcosentino
Facebook: https://www.facebook.com/DevL...
View Transcript
hey just wanted to make a quick video on this error that sometimes comes up in unity if you're using gnosis gui and uh how to troubleshoot it um and uh how to fix it basically so it ends up being pretty misleading but this error right here that i'm going to highlight is telling me that there's no xaml found so no xaml file found at this location for a a resource that i have called main menu view dot xaml and sometimes this happens i haven't actually figured out exactly why it happens but i do know how to to kind of correct it for you so what i observe when this happens in my unity editor is that when i press play it basically um it can't like it won't end up loading the ui component for it so we'll just do this here and you'll see
that now it's playing right by this blue button being no longer grayed out nothing's showing and we get this error message that says hey it's not found but i find that really confusing because you know say everything was just working i hadn't made any code changes if i go look for where this is my my editor here you know scenes main menu gui gnosis resources um i have that xaml file uh right here right so there's the xaml and then like the xaml.cs file they're side by side and for me like this this is really misleading because it suddenly just can't find it like nothing's working but the way to fix it is actually super easy so whenever you see this kind of thing happen all that i recommend doing is kind of forcing the asset recreation by gnosis in unity and what i mean
by that is that gnosis is going to translate your xaml file into a an asset that can be used by unity and for whatever reason uh like i said i don't want the underlying reason but it seems that they're out of sync and then unity is unable to find the right asset for this so even though it says it can't find the xaml file i truly think it has something to do with the asset being incorrect so all that i'm going to do is right click here go re-import you can see the icon change and then it changed back um that's all that i do to correct it and then the problem goes away so i'm going to press play again and hopefully something happens here it's just taking its time there we go so like you know i'm recording this so you saw that
i wasn't changing code or anything to go fix anything up all that i did was i re-imported in this folder where it's saying that it can't find the xaml file and as you saw the icon here for the asset changed and then it changed back so it's basically recreating that asset for us and then all that i did was i pressed play again and things kind of came back so um i don't know why but periodically i find this happens i might be working on something and i kind of come back to this i press play to go uh try out whatever i was doing even if it's not ui related so say i was changing something in the back end of the game or something i'll i'll press play and then all of a sudden like literally nothing's working like i don't have a
user interface in this particular case my main menu doesn't even show up and then the error is just that it can't find a xaml file but if i check my source control and i look on disk the you know the xaml file is absolutely there so this is the way around it i don't know why but just re-import in the folder that you're apparently missing the xaml file in and it'll recreate your asset for you and then you're back in action hopefully that helps a couple people thanks
Frequently Asked Questions
What should I do if I encounter the 'No XAML file found' error in Unity when using NoesisGUI?
If you encounter the 'No XAML file found' error, I recommend right-clicking on the folder where the XAML file is located and selecting 'Re-import'. This forces Noesis to recreate the asset, which usually resolves the issue.
Why does Unity sometimes fail to find the XAML file even when it exists in the project?
This issue can be misleading because even though the XAML file is present, it seems that the asset may be out of sync. Unity is unable to find the correct asset, which is why re-importing the file helps to correct it.
Will re-importing the XAML file affect my existing code or project setup?
These FAQs were generated by AI from the video transcript.No, re-importing the XAML file does not affect your existing code or project setup. It simply recreates the asset for Unity, allowing the UI components to load correctly without any changes to your code.
