I created new 3d unity project, then in asserts I created c# script if I click on it twice Visual Studio 2017 is opened. Then I would like to make a debug, so I set debug point and click in Unity on play button and nothing happes.
There is no attach button or something like this.
What am I doing wrong?
This happens randomly to me as well. The way I fix it it to go Unity->Edit Menu->Preferences->External Tools, and set the External Script Editor to something else, and then revert it back to Visual Studio.
If that fails, just underneath that dropdown there is a button Regenerate Project Files, which helps when your VS project files get messed up.
Also, upgrading to the latest version of Visual Studio and Unity Tools for VS could help.
My bad if I misunderstood this question, but all you have to do for unity to update your scripts for your game is ctrl + s, this will let unity know you made changes to the script and it will apply those changes.
Related
I have been watching tutorials on youtube (i'm new to unity), I was trying to add a rigid body to my player, which I've never done. In the video they clicked add component in the inspector then physics then rigid body. but i don't see physics and when I search for it nothing appears. the only options i get are:
Effects
Layout
Mesh
Miscellaneous
Rendering
New Script
Underneath Box Collider i get a warning saying the the "module that implements this component type has been force excluded in player settings" could this be the problem? If so how would i fix it?
Thanks.
Try go to the PackageManager, switch to Built-In Packages and see if the package Physics is installed. Sounds like it has been actively be removed (uninstalled) or you somehow broke the Packages/manifest.json file.
If you can't even get the PackageManager try to reset the packages as described here via the top menu bar → Help → Reset Packages to defaults
or just directly replace your Packages/manifest.json with a one from a fresh empty project
Also note
Our first TECH stream release of the year is available as of today. Unity 2020.1 includes a wide range of features and improvements that make Unity workflows even more intuitive and make you more productive, while Unity 2019 LTS remains the recommended version for projects in production.
The PackageManager got an overhaul and a lot of users had issues like yours. See e.g. this thrread.
You should stick to the LTS versions, currently 2019.4 LTS (except for experimenting with the very newest features).
So if you type in the search bar of Add Component "Rigid" nothing pops up? If not I believe it should.
The problem could be in your libraries. Try deleting the library in your project (with Unity closed). Maybe if you have not made much progress in this project you could try opening a new unity project and seeing if it works.
I've got a problem that is seemingly impossible to debug. My project originally started using 2019.2 and upgraded to 2019.3 without any problems. I then installed the preview package for the new input system.
This "disabled" all the buttons in that they are visible in the editor and during run time but they are impossible to click on or interact with.
To reproduce this issue I tried:
Creating a new empty 2D project
Installing and switching to the new Input System
Importing their demo scene from the package manager
At this point I tried running each scene. All of them worked except "SimpleDemo_UsingActions.unity".
I added a button to the "SimpleDemo_UsingPlayerInput.unity" and added a script to the button. With a function:
public void Button()
{
Debug.Log("Button Pressed");
}
I ran this scene and it worked! I could move around shoot the cubes that is built into the script and I could click on the button and it showed in the log.
For this reason I am stumped. I do not know how to debug this issue.
Can I have some advice? Has anyone had a similar issue or know how I would go about debugging this?
I managed to find the answer. For some reason using the new input system's "InputSystemUIInputModule" breaks all the UI and just does not work.
I fixed it by just deleting my EventSystem and creating a new one in the scene.
Do not. and I repeat. Do Not use the new input system's manager for the event system.
I write answer because it's first result in google.
To get rid of this, select EventSystem in hierarchy, then in inspector you should see warning and button to replace old input system with new.
Unity ver. 2019.4.1
Input System ver. 1.0.0
I'm still currently testing but I manage to get something by duplicating the defaultInputActions.inputactions file from the Packages >> Input System >> InputSystem >> Plugins >> PlayerInput.
I realized that that .inputactions has a UI Action Maps. I added more Action Maps and did some testing, the added action maps works and buttons are somewhat reacting as well.
Just sharing this now so that more developers can test this with me and hopefully find a way to work around this major issue.
Had the same issue. Make sure that the input system package, does not have any devices inside... It worked for me after migrating from the Previous Input System
I am a newcomer when it comes to Unity. I was following along with this online course. At one point, I had to write a C# script. So, I created one and doubled clicked it to edit it with Visual Studio. However when Visual Studio opened, all I could see was a essentially a blank screen. I couldn't see any code. Does anyone know the fix?
Thank you
Did you create it inside like this ... In Unity>ProjectWindow>AssetsFolder>RightClick>Create>C#Script.Then double click to open it.It will open up a script containing Start() and Update() method.If you could not find this.Restart and try.This is to test and try script for Unity scripting.
So this is way too late for the original post but maybe someone else will find this useful. So you did everything you were supposed to and even see the automated code with everything it should have in the inspector, but when you go and run the code whether clicking the actual script in the asset>scripts or clicking the open button in the inspector the same problem persists... blank uneditable screen.
I think you may just need to run updates on Visual Studio and/or if on a Mac maybe you need to log back into Microsoft. To do this just click the Visual Studio tab and click check for updates. Usually, you will also see an update suggestion in the top center of the screen. Run the updates and let it restart visual studio. Once you reopen visual studio at this time if you are on a Mac it should ask you to log into Microsoft. Your code might show up now.
I installed VS Code to use with Unity. Everything is great except for one small annoyance. When I edit my source code in Code and switch to Unity to run my game, the code is not automatically saved. I have to manually save the VS Code before switching.
I checked settings, but could not find anything. Is there anyway to effect this?
This works fine for me, is this option visible to you?
I can't find the component tabs anymore. It shows here that the component tab is opening but actually it isn't. I've cleared all the window but this tick of components tab still exists. Now my code is broken and I can't link the new tank barrel to the Tank_BP blueprint class. What should I do? Try resetting layout and even reinstall Unreal but it still didn't work. Any help will be appreciated!
Screenshot
Are all actor blueprint editor view all the same as you described? Did the log report some errors about that?
I think maybe there is something wrong with your editor, several ways to solve youre problem:
+ If you are using the installed version(which is installed from Epic Games Launcher),just try to use verify to repair your editor.
verify entry
If you are using the compiled version, just try to debug the blueprint editor module.