I am trying to move all of my non Unity-specific code into classes which don't inherit from MonoBehaviour, similar to this. I created a separate Visual Studio project called Models for all of my non-MonoBehaviour classes, and I added that project to the Visual Studio solution. However, I can't add a reference to my Models project to my Unity project through Visual Studio (the Add Reference button isn't there when I click on the Unity project, and I've read that Unity automatically rebuilds its Visual Studio project anyway, so any added references would be lost), so I set the output location of my Models .dll to the Assets folder in Unity and I added that .dll to my Project view in Unity. That's all working. The problem is that whenever I rebuild my Models project, the Unity project in Visual Studio doesn't seem to pick up the changes, so I have to delete the .dll from the Project view in Unity and re-add it every time I make any changes to the Models project.
Is there a way to have Visual Studio automatically see the changes to my Models .dll, or is there a better way to go about having my Unity project reference another Visual Studio project?
I tried researching this for you, and the closest thing i could find so far is this: http://devleader.ca/2015/02/08/multiple-c-projects-unity-3d-solution/
It details how to adopt unity and visual studio to work well and sync up correctly without rebuilding/running/other crazy things to get the projects working together.
Hope it helps.
Related
In tutorials and in the programming book I am following, it all shows something like this to be on the homepage of vscode:
I want this too, so I can press the "Create a new project" button. However, my homepage of vscode looks like this, also after re-installing:
How can I create a new project?
The tutorials you're following are for Visual Studio. You've installed Visual Studio Code. Despite the similar names, they are completely separate products with completely different UI's and implementations, but with a little overlap in functionality. If you want the full Visual Studio (the current version of which is 2022), you probably qualify for the free Community edition, which you can download here, though of course you should double check the license to be sure.
I'm taking a class on making 2d games in unity, but unity won't open the game file. The error message is: Project path does not exist C:\users\Ohy0y\oneDrive\unity\NewUnityProject. Please note that the unity folder is not official, it is made by me. I have updated unity, deleted every previous version of unity, and tried to redirect the path into an empty folder.
This is my first day learning unity so I may be missing something obvious, please answer if possible!
A "game file" does not exist in Unity. In Unity, you have a specific folder structure. The project folder is the folder your Assets, ProjectSettings, Packages,... folder is inside.
In Unity Hub, remove the project you are trying to open from the list of projects and add it again by chosing your project folder (the one containing the Asset folder and such).
If that doesn't work for you, please specify why and try the following step:
In your project folder go into the ProjectSettings folder and open the file "ProjectVersion.txt" and tell me what the first line sais (m_EditorVersion: xxx). This is the project version, i.e. what Unity Version was used to create the project. That version should match the Untiy version you have installed.
Also, gernerally speaking, Unity Answers is the better platform for you to get quick answers to simple Unity related questions.
If you want to run your Game (Game File), you need to create a build first.
But of course you need to build a working scene first. If you have problems just opening the project with unity, i would try making a new project outside onedrive.
I'm currently trying to move a solution with multiple projects from VS 2015 to VS 2019.It consists of one application and a couple of class libraries, target framework for each is .net 4.5.1. I have made a local copy of the solution to do this.
Most of the projects compile without a problem, but some of the one that are used as AddIns for the application don't.
When trying to build, doesn't matter if the projects by themselves or the whole solution, it fails because it's looking for itself. In my example picture, the project ZZ_WPF_Bank_AddIn is, while trying to build, is looking for the ZZ_WPF_Bank_AddIn in the bin folder of another project in the solution.
I tried just copying the dll from the original project, to see what happens, but it just points to the same dll missing in another project.
Has someone encountered this behaviour before? I tried googling it, but couldn't find anything useful.enter image description here
For anyone who might stumble upon this:
The solution to my problem was removing all references to projects inside the solution and adding them via Browse, noch via the projects tab on the left side. For some reason the bindings were not working properly after the migration.
I'm using VS Code several days as MonoDevelop replacement in Unity3D on Mac OS. I installed mono via homebrew as suggested to let VS Code to parse system assemblies. Everything works almost great, but I can't navigate definitions that are not part of my code. For example I can't go to definition of System.String or UnityEngine.Vector3 to see methods signatures. MonoDevelop has Assembly browser but I miss it in VS Code. Does anybody know if VS Code has such feature? Maybe I need to setup something for that?
PS: I've posted feature request. If you're interested in this feature vote for it, please.
https://visualstudio.uservoice.com/forums/293070-visual-studio-code/suggestions/14698887-implement-net-assembly-browser
It seems VS Code now can do that with the new extension ms-vscode for C# support. Previously it was recommended to use Legacy C# Support for Unity3D. I don't know exactly if this recommendation is still valid, but I tried to uninstall legacy and to install normal one. After some background work OmniSharp parsed my files and now it can open classes from assemblies! Look at this picture, it has open AnimationCurve class as [metadata]!
I'm trying it with Unity3D 5.5.0b2 beta now, so I'm not sure if this will work with production release of Unity3D. By the way I also removed VSCode plugin from dotBunny out of project as Unity3D 5.5 supports Visual Studio Code self.
Is it possible to build content for MonoGame 3.0 without having to install Visual Studio 2010 and XNA 4.0?
The content I have to build is:
3D models
textures
sprite fonts
I am aware that there exists MGCB, but before I try and use it I need to know if it is reasonably reliable for what I need it to do.
I'm no expert in this area, but I noticed you don't have an answer yet so I'll try my best.
Having Visual Studio and XNA Game Studio 4.0 installed will allow you to create Content projects that can compile your content into XNB files. Those XNB files can be used in your game without Visual Studio. You can use Xamarin Studio instead.
However, it's also possible to use some content directly. For example, you can use raw PNG files instead of compiled textures and you can build your own system for fonts. I'm not sure about 3D models.
I can't vouch for MGCB but I've read that the MonoGame team are currently developing the content pipeline. If it's not working now it probably will be in the not so distant future.
So yes, it's probably possible.
Just some helpful links. I don't know if the MGCB is finished or completed. I say that because i though i saw a todo list some where on their Git repo. I could be wrong about that.
https://github.com/mono/MonoGame/wiki/Tutorials:-Installing-Prerequisites-on-Windows
http://www.monogame.net/documentation/?page=MGCB
docs on git say build from source
https://github.com/mono/MonoGame/wiki/MonoGame-Content-Processing#building-monogamecontentpipelineprocessors
Video shows how to build MGCB from source.
http://youtu.be/ultZwdGizqM?t=5m57s