I've identified a problem with one of my 2d platform gameobjects with a animator component attached to it.
The platforms sprite goes missing at runtime and this is directly caused by the animator itself, which before wasn't a problem. when I disable the animator and run the game the sprite doesn't go "missing", but as soon as I enable it, it's missing again.
This is probably happening because I started the project in unity 2019b and switched to 2018.4.12 because I was getting weird CURL errors that prevented me from building for Android. The affected prefab(platform) functions as it should other then the fact that the sprite goes missing at runtime and nothing about the project has changed. Code works perfectly as it did when there were no issues.
I just installed unity 2019.2.13 hoping this would solve it but no change. Tried re-importing the asset but nothing. This isn't a collision issue. The 'z' axis is not modified at runtime. and its definitely not a code issue because as stated before the functionality isn't affected, its just the sprite going missing. I'm out of ideas now and exhausted online resources. Can anyone help in any way. Thanks in advance.
simple fix. i just created a new prefab and re-created the animations... Annoying but it worked
Related
I have a platform that I need to flip the direction of when it collides with an object. The platform as well as its child objects belong to the layer "FlyingOrPlatform". The object that the platform collides with should belong to the "GameControl" layer. But if i set it to that it doesnt collide with it.
If I set the object that the platform collides with to either the "Player" or "Default" layer. Then it works completely as it should. But I wish to use the "GameControl" layer.
I have tried where I save the scene and the project, as well as restarting the editor.
I dont see what should be wrong with my layer setup. Any suggestions?
In my script for reversing the platform direction there is no layer check, it does check the tag but I ensured that the tag is the same when I switch between the layers. I just use Unity's built in OnTriggerEnter2D lifecycle method. Have tested with OnCollisionEnter2D and OnTriggerStay2D as well, same result.
Here is a link to a video demonstrating the issue, as well as a screenshot of my physics2D settings below. In the video I first show how its supposed to work, and then I switch the object the platform collides with to the GameControl layer, after which it doesnt work.
Video of issue: https://www.youtube.com/watch?v=l-eqYI-K-Ug
Physics2D settings:
From what I can tell this appears to be an issue with the Physics2D matrix in Unity that occurs from time to time. A couple of other people have written similar things on other forums.
Among others this reply had a similar issue:
For lack of better, I found a work-around by using the "Ignore Raycast" layer instead of the "GameControl" layer.
I have reported it as a bug to Unity.
EDIT:
Here is the reply I got from Unity.
"Hi,
We successfully reproduced this issue. It will be possible to follow
the progress on a chosen resolution in our public Issue Tracker once
the report has been processed (this might take up to an hour):
https://issuetracker.unity3d.com/product/unity/issues/guid/1325018
We highly appreciate your contribution. If you have further questions,
please feel free to contact us."
i am using Unity 2019.4.9f1 with SteamVR. The Teleporting-System works as expected in Playmode. When I build, there are some strange collision-glitches with the TeleportArc. The point at the end does not collide correct with mesh. The colliders seem to be underneath the floor(while still working properly), or the wall mesh etc. I am also able to see the TeleportPoint through mesh.
Editor-Playmode:
Working as expected
Build:
TeleportArc not colliding with Wall
TeleportArc not colliding with Floor
TeleportPoint visible through Wall
Has anyone experienced errors like these? Thanks in advance.
Edit: I would like to show these images in my posting but I am not allowed to because of my karma.
Okay, I found a solution:
It is a problem with the Material of the Teleporting Prefab. The URP-MaterialSwitcher was not working correct. I changed the materials manually and now everything is working fine.
https://github.com/ValveSoftware/steamvr_unity_plugin/issues/875
Last night I was working on my game, and everything seemed to be working perfectly. I added a sprite to my Assets/Sprites folder, then my laptop died. When I plugged it in and turned it back on, the GameObject.Find("Weapon Wheel") line in my PlayerControls script was no longer able to find the weapon wheel object. To my knowledge, no changes to the scene or any scripts were made.
Even stranger, my CommandPattern script also has GameObject.Find("Weapon Wheel"), and is able to find it perfectly fine.
Has anyone experienced the Find function suddenly not working, and if so, found a solution for it?
EDIT: Deleting the player prefab then replacing it with a new one fixed the issue, but I still have no idea why this happened in the first place.
I dunno how ur game is architectured and a direct solution but you can try to create a Gameobject variable in the Playercontrol class and then drag the weapon wheel in the field in the unity overlay
I am trying to capture Unity's OnMouseDown events.
As far as I concerned, I need to add Physics Raycaster module into my Main Camera object.
But, when I tried to do so, there was a message "Physics module is not present. This Raycaster will have no effect". The same with 2D.
I have already tried:
Reset packages to default
Find Physics\Physics2D in asset store
Does anyone have an idea how to fix this issue?
I have rolled back the unity editor's version to 2019.2.14f1 and this solved my problem.
I have investigated the issue and it seems to be only an editor script problem. The warning is there, but the raycaster works fine.
Having some trouble getting the NetworkLobbyManager to honor my NetworkStartPositions. This stems from the fact I generate my board dynamically when the game scene is loaded in my GameManager object.
I tried disabling auto spawn in the NetworkLobbyManager but it prevents LobbyPlayers from spawning too.
I would move my GameManager or NetworkStartPosition Spawner up into the Lobby scene but that doesn't seem like the right answer.
Here's where I am in my project: https://github.com/jakecoffman/tanks-unity/tree/f397b8b4e494461b94c718f1997d7572e5c6821f
Any suggestions? Any other tips on my project are welcome too.
I found someone else's project on Github that overrides OnLobbyServerSceneLoadedForPlayer and sets the position of the game player. Still not sure how to use NetworkStartPosition, but this is simple enough!