Answer by IvovdMarel
Hey Falconstrike! On your post: I recommend in the future to provide a bit more context to your problem. You can share your own code snippets, and explain in more detail what part is not working (e.g....
View ArticleAnswer by IvovdMarel
As URP is completely different render pipeline, yes, it will improve performance. Obviously an empty scene is light enough to probably not notice the difference, but URP will be lighter.
View ArticleAnswer by IvovdMarel
I would recommend looking at a plugin like FinalIK that does exactly this.
View ArticleAnswer by IvovdMarel
1) To best find out what's causing the delays, you should use the 'Deep Profile' option. Very often you'll be surprised what's causing it (e.g. you might have something logging to the Console,...
View ArticleAnswer by IvovdMarel
I believe you are looking for the mask component. - Add an Image component - Add a Mask component
View ArticleAnswer by IvovdMarel
Just an updated answer on this, as Unity updated their prefab system: //Get path to nearest (in case of nested) prefab from this gameObject in the scene string prefabPath =...
View ArticleAnswer by IvovdMarel
if (reloading) { if (currentAmmo <= 0) { if (ammoInventory >= 40) { currentAmmo += 40; ammoInventory -= 40; } else { currentAmmo += ammoInventory; ammoInventory = 0; } } }
View ArticleAnswer by IvovdMarel
Using transform.Translate will always cause these kind of issues as it disregards the physics system. You'll have to move your object using the physics system, by accessing your Rigidbody component....
View ArticleAnswer by IvovdMarel
The error will no longer pop up, and your code will compile, but it definitely does not fix the problem. You're basically telling the program to 'try' and run this code, but if there is any error you...
View ArticleAnswer by IvovdMarel
Depending on how you are modifying the y, you should look at Global: //These two lines do the exact same thing. transform.postition += new Vector3(0,5,0); transform.Translate(0,5,0, Space.World):...
View ArticleAnswer by IvovdMarel
This is the old way of displaying UI and definitely not the easiest if you're trying to create a custom score-field. I recommend watching some tutorials such as:...
View ArticleAnswer by IvovdMarel
Yes FixedUpdate will do what you need. https://docs.unity3d.com/ScriptReference/MonoBehaviour.FixedUpdate.html https://unity3d.com/learn/tutorials/topics/scripting/update-and-fixedupdate
View ArticleAnswer by IvovdMarel
I recommend using transform.InverseTransformPoint to calculate the local position of the collision. You should only have to look at the x or z value then (as the origin would be 0,0,0)
View ArticleAnswer by IvovdMarel
The null reference exception comes from either the SortedList being null or the UnitInfo component being null. Has your SortedList been initialized? UnitInfos = new SortedList(); Does every tagged...
View ArticleAnswer by IvovdMarel
What platform are you aiming to build for? If you're exporting to Web or another AoT (ahead of time compilation) platform, this can be a struggle. If you're building a standalone build though using...
View ArticleAnswer by IvovdMarel
Vector2 rotatedDirection = Camera.main.transform.TransformVector(direction);
View ArticleAnswer by IvovdMarel
You'd have to use a variable that persists through your scene-switch. Easiest: Create a static variable e.g. public class LevelManager { public static string currentLevel = "MyFirstLevel"; } and change...
View ArticleAnswer by IvovdMarel
The Unity Manual would be the place to start: https://docs.unity3d.com/Manual/AssetBundles-Workflow.html
View Article