Quantcast
Channel: Answers by "IvovdMarel"
Browsing index pages (145 articles)
↧

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 Article


Answer 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 Article


Answer by IvovdMarel

I would recommend looking at a plugin like FinalIK that does exactly this.

View Article

Answer 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 Article

Answer by IvovdMarel

I believe you are looking for the mask component. - Add an Image component - Add a Mask component

View Article


Answer 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 Article

Answer by IvovdMarel

if (reloading) { if (currentAmmo <= 0) { if (ammoInventory >= 40) { currentAmmo += 40; ammoInventory -= 40; } else { currentAmmo += ammoInventory; ammoInventory = 0; } } }

View Article

Answer 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 Article


Answer by IvovdMarel

Try: EventSystems.EventSystem.IsPointerOverGameObject

View Article


Answer 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 Article

Answer 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 Article

Answer 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 Article

Answer 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 Article


Answer 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 Article

Answer 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 Article


Answer 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 Article

Answer by IvovdMarel

Download the latest version of Unity. There's the learn tab

View Article


Answer by IvovdMarel

Vector2 rotatedDirection = Camera.main.transform.TransformVector(direction);

View Article

Answer 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 Article

Answer by IvovdMarel

The Unity Manual would be the place to start: https://docs.unity3d.com/Manual/AssetBundles-Workflow.html

View Article
Browsing index pages (145 articles)


Latest Images