Open MJSahebnasi opened 2 months ago
Sorry for the late reply! This sounds like an issue with the Roslyn Compiler not recognizing the Widgets class defined in the project. The way this is done in the project is a bit hacky - it depends on using the assembly generated by Unity for the project (Assembly-csharp.dll). This should be included in the Assemblies folder - did you perhaps forget to make an assembly reference asset for it? Note that you can also alternatively specify already loaded assemblies in the project rather than refer to the .dll files too.
Hi, thanks for sharing this project!
I had the same problem, it is fixed by adding the abovementioned Assembly-CSharp reference from the Assemblies folder. In addition, unsafe code needs to be allowed from the Roslyn C# settings and code security checks need to be disabled (found in Tools -> Roslyn C# -> Settings).
I also had the same problem with the same three errors. In general, I think it is quite hard to understand how to properly set up the assembly reference assets. Anyway, I think I managed to solve most of it but it still doesn't work fully and I don't know how to solve the third error presented in this thread, which is "Object reference not set to an instance of an object".
I have the same error. As a beginner with Unity, I am unsure how to create a reference to Assembly-CSharp.dll. Could someone please guide me on this?
I have the same error. As a beginner with Unity, I am unsure how to create a reference to Assembly-CSharp.dll. Could someone please guide me on this?
Firstly, add Roslyn C# runtime plugin to the projects.
Then,
①Inside Unity Editor, open folder→ /Assets/RoslynCSharp/AssemblyReferences/
②Assets > Create > Roslyn C# > Assembly Reference Asset
Look at Inspector
so rename and select file like this↓
Go to /Assets/RoslynCSharp/Resources/
@youetube
Thank you so much for your help!
I followed your advice, and I was able to resolve the issue.
Now I've able to play Playground_new
demo successfully!
I also had the same problem with the same three errors. In general, I think it is quite hard to understand how to properly set up the assembly reference assets. Anyway, I think I managed to solve most of it but it still doesn't work fully and I don't know how to solve the third error presented in this thread, which is "Object reference not set to an instance of an object".
@Ale8599 I suspect that unnecessary .dll (AssemblyReference) files were added to RoslynCSharpSettings.asset Only Assembly-CSharp.dll should be appended, while the default 14 .dll files should remain as they are. https://github.com/microsoft/LLMR/issues/14#issuecomment-2474007880
@youetube Thank you for your insight but I still can't manage to make it work. I actually had unnecessary .dll files added to RoslynCSharpSettings.asset but, even by removing them, it doesn't change the result. I'll add a couple of screens to document my situation.
@Ale8599 Press the button of "Select Assembly File" and choose /LLMR-main/Assemblies/Assembly-CSharp.dll Do NOT use "Select Loaded Assembly"! Error message "version=0.0.0.0, PublicKeyToken=NULL" means invalid path to the .dll file
Once again thank you for your help, even if the thing you suggested unfortunately didn't actually work. I didn't know that that error message meant it was an "invalid path to the .dll file" problem. Anyway I already used the "Select Assembly File" button to select the path. So the problem must be somewhere else.
Hello, and thank you for sharing this great project!
I could setup the project without any specific errors (added the Roslyn package and my OpenAI API key. Also made a minor change in the code: had to add an explicit cast to String to solve a compile error. No other issues).
When using the tool, I get 3 errors.
creating a rotating cube that changes color every second
Playground_new
andPlayground_DallE-CLIP_Refinement
scenes. (I get a NullReferenceException usingDalleCLIP_Modular
scene that kind of aborts the process.)Execution log:
The details of the 3 errors:
Thanks in advance!