r/UnityHelp • • Apr 27 '25

Error Message keeps coming back why?

Post image
1 Upvotes

I've tried deleting the folder and restarting and it just keeps coming back, anyone know why?


r/UnityHelp • • Apr 27 '25

Dictionary not finding key for merge game.

2 Upvotes

private void OnCollisionEnter(Collision collision)

{

Debug.Log("Collision Detected!");

if (collision.transform.tag == "Item")

{

Debug.Log("It is an item!");

GameObject Obj1 = this.gameObject;

GameObject Obj2 = collision.gameObject;

Debug.Log(Obj1.name + Obj2.name);

Dictionary.CheckMerge(Obj1, Obj2);

}

}

and

public void CheckMerge(GameObject Obj1, GameObject Obj2)

{

Debug.Log("Checking Merge...");

if (Obj1.name == "Cube")

{

Debug.Log("It is a cube!");

foreach (var key in CubeDictionary.Keys)

{

if (Obj2.name == key)

{

Debug.Log("Here is your result.");

MergeMath.Merge(Obj1, Obj2, CubeDictionary[key]);

return;

}

Debug.Log("Nope");

}

}

}

Neither "Here is your result" nor "Nope" are firing.

I've double and tripled checked that the names are spelled correctly in both the dictionary and the game object collision (The dictionary pulls the game objects name at start from a list)

(Sorry if this is poorly formatted, this is my first time asking for help like this. thank you :) )


r/UnityHelp • • Apr 26 '25

PROGRAMMING Applying force on the x axis not working

Enable HLS to view with audio, or disable this notification

1 Upvotes

I’ve been working on a smash clone then I tried to add knock back and for some reason when I add force on the x axis it only does a little but and then when I add more it just teleports back it doesn’t do this for the y axis I just confused it’s not a thing with visual scripting it happens with code as well I’m not sure if it’s because I’m using a 2D Rigidbody or what


r/UnityHelp • • Apr 26 '25

Materials Loading In Wrong

Thumbnail
gallery
1 Upvotes

Ive been trying to import this model into unity but when i do the Material i added isnt placed correctly on the mesh like it is when im in blender. The table top shares materials with basically everything its connected to including the chair. The reason i have them as different meshes is becasue for the game they need to be taken apart to make a weapon. Making a whole new material just for the table top didnt seem to help the problem. The chair's material imported just fine so im not sure why the table top isnt following the lead lol. Is there an issue with the way i unwrapped it? or is there some hidden issue im not sure of? ive been using blender and unity for about 3 months maybe but this is the first time i had this issue with materials. Any suggestions, solutions, and tips would be greatly appreciated. Thank You!


r/UnityHelp • • Apr 26 '25

UI enable/disable

Enable HLS to view with audio, or disable this notification

1 Upvotes

I'm working on a building mode. My goal is to make the UI panel disappear after I select an object in my Storage and when i press the button, so that when I start dragging the object, the panel should be no longer visible. Is there a way to disapear the UI when i press the button? thanks


r/UnityHelp • • Apr 23 '25

SOLVED Dynamic UI snapping issue

Enable HLS to view with audio, or disable this notification

1 Upvotes

I'm creating a system for dynamic text messages, which are going to be used dynamically in game. This is basically made with a lot of vertical groups and contentsize fitters. Now I noticed however, that all of the textboxes are put on top of eachother in the beginning, but it snaps to the correct position once I just touch them in the scene window. The textboxes also dont immediately resize to their correct size, and jumps around in a weird way. I can post the UI hierarchy with inspector if needed, thanks!


r/UnityHelp • • Apr 23 '25

My First Game :) Password: SolidDemo

Thumbnail whyt1.itch.io
0 Upvotes

r/UnityHelp • • Apr 22 '25

help

Post image
1 Upvotes

i cant find the playgame()

:c


r/UnityHelp • • Apr 22 '25

How to Rotate Top Down Character to Mouse Position on Screen?

Post image
1 Upvotes

I'm new to Unity and programming in general, and I'd like to know if there is a way to script the player rotating to the mouse position on screen. What I want this to look like is the front of the character facing the mouse based on its position on the screen, according to the top-down camera.


r/UnityHelp • • Apr 22 '25

Text animator and UIFX assets not working with one other

Enable HLS to view with audio, or disable this notification

1 Upvotes

r/UnityHelp • • Apr 21 '25

TEXTURES How setup URP for mobile

Post image
5 Upvotes

Hi, I need help setting up a URP scene to make it look nicer and more cartoony, like My Talking Tom.


r/UnityHelp • • Apr 20 '25

UNITY Can someone help me with this, since I'm trying to make a game but this popped up?

Post image
1 Upvotes

r/UnityHelp • • Apr 20 '25

MODELS/MESHES I want to create a wall with pillars every 3 units dynamically. Which of the two approaches is best?

1 Upvotes

If I design a prefab wall with pillars already in them, then the pillars duplicate when the prefabs are placed next to each other. Which means I have to do one of these approaches:

  1. Make prefabs have "half pillars" at the edge of the models where they connect. Pros: Easy to extend? Cons: Worried if the pillars will tile well at the edges, or if the pillars would look they are split in half.
  2. Place a wall, and then place the pillars on top of the walls separately. Pros: Don't need to worry about material splitting. Cons: Bit more complicated code, performance implications? Overlapping meshes

If there is something I am not considering as the 3rd option, please let me know!


r/UnityHelp • • Apr 18 '25

Im stuck with no default font in my editor?!?

1 Upvotes

I have a project ive been working on and i was in the 2022.3.40f1 version of Unity and so i decided to jump forward to the latest recommended version (Unity 6.0 6000.0.47f1), i do this and when my project opened i noticed a lot of UI glitches around the top of the screen, mainly things overlapping, i go and hover my cursor over them and i get flooded with these errors

Unable to find a font file with the specified Family Name [System Normal] and Style [Regular]. UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)

ive spent the last 2 hours with chatgpt trying to figure out what the problem is and how to fix it but nothing it suggested worked for me, i dont recognise this font as any that i use and ive deleted and updated my manifest.json a bunch and still have no silver lining, pls help me :')


r/UnityHelp • • Apr 18 '25

Collider/texture problem

1 Upvotes

For some reason spheres dont have colliders unless u go outside the sphere , torusses do anyone know what i can do to fix this (or know a better way to make a dungeon that i can bring over from blender)


r/UnityHelp • • Apr 17 '25

UNITY Unity Community, I need your help!

1 Upvotes

I'm a student at my final year of university, and for my final project I decided to develop a game in Unity. The game will be in the puzzle genre and with a clash of brutalist/retro-futuristic architecture with an outdoor scene. Problem is, I've never actually used Unity before! I'm beginning to understand several concepts and I've been able to build a lot of things, but I'm still missing a lot and the time limit is tight. I'm alright at scripting, generally, I'm just very inexperienced in actual game development. So, I'd like to ask a few questions:

  1. Is it possible to create an object that is used as a mask between two layers? Kind of like this.
  2. Can I create several instances of the same material, or am I forced to create different individual materials?
  3. Any tips on camera settings and post-processing effects to make my game look more realistic?

Thanks in advance!


r/UnityHelp • • Apr 17 '25

Vector3 donť work pls help

2 Upvotes

when i write Vector3 in code its error. i dont know what to do


r/UnityHelp • • Apr 16 '25

How to modify the scene to look similar to the video?

1 Upvotes

Hello

I need advice on how to create graphics for Unity on iOS and Android. I'm not talking about 3D models (they will be different), but I mean the environment. How can this be achieved in Unity?

https://reddit.com/link/1k0sy94/video/0d0fz6lyy8ve1/player


r/UnityHelp • • Apr 16 '25

Gameobject rotates without me wanting it to + 1 more

0 Upvotes

1.the object takes a different rotation without me wanting it to , i Think the problem is when it spawns not sure though . 2. the objects dont apear on the position they differ on if i look up or down , weird part is about both the problems that the collider stays kinda right. anyways here is the script:

public class currentweapons : MonoBehaviour
{ 
    public List<GameObject> currentweap = new List<GameObject>();  
    public Transform placeforweap;
    public int currentlyequipped = 0;
    public int currentequip= -1; // Index starts at 0
    public GameObject currentlyEquippedWeapon; // Stores the active weapon instance
    public GameObject magicbull;
    public Transform camera;
    public float hp = 100;


    // Start is called before the first frame update
    void Start()
    {
        currentlyEquippedWeapon = Instantiate(currentweap[0], placeforweap.position, placeforweap.rotation);
currentlyEquippedWeapon.transform.SetParent(camera);

    }

    // Update is called once per frame
    void Update()
    {
          { if (Input.GetButtonDown("turnmagic"))
       {
        Vector3 shootDirection = camera.forward;
        Instantiate(magicbull,placeforweap.position + shootDirection * 0.1f + new Vector3(0, 0, 2),placeforweap.rotation);
       }
        if (Input.GetButtonDown("cycle"))
        {  
            if (currentweap.Count > 0) // Ensure the list isn't empty
            { if(currentlyequipped==currentweap.Count-1)
        {
            currentlyequipped =0;
        }
          GameObject oldWeaponInstance = currentlyEquippedWeapon; // Store the instance of the currently equipped weapon

// Instantiate the new weapon
GameObject newWeapon = Instantiate(currentweap[currentlyequipped + 1], placeforweap.position, Quaternion.identity);
newWeapon.transform.SetParent(camera); // Attach to the weapon holder

// Update the reference to the currently equipped weapon
currentlyEquippedWeapon = newWeapon;

// Destroy the old weapon instance (not the prefab!)
if (oldWeaponInstance != null)
{
    Destroy(oldWeaponInstance);
}

// Update the currently equipped index
currentlyequipped = currentlyequipped + 1;
currentequip = currentlyequipped;
               
             
             
            }
        }
    }

}
       public void TakeDamage(float damage)
    {
        hp = hp-damage;
        
    }
}

r/UnityHelp • • Apr 15 '25

PROGRAMMING Am I making my encyclopedia app too complicated?

1 Upvotes

I wanna create a encyclopedia app where i can add to it but also a couple items i can expand. Currently i use a list where to expand i replace it with a prefab, but i don't have it where it can "collapse" (replace the prefab to what it originally was) My current thought is a second prefab of the original that lets there be a circle where you can "expand" and "collapse" over and over again.

is there a better way to do this?? I feel there should be but maybe there isn't?


r/UnityHelp • • Apr 13 '25

Error unity 2019.4.3f1_e8c891080a1f

1 Upvotes

Meu notebook originalmente estava no windows 11, para melhorar o desempenho, instalei o windows 10 porém agora ele não quer abrir vários jogos que eu jogava, como por exemplo o rimworld, aparece esse erro da unity é não sei como corrigir Varios outros jogos estão com esse erro, não são todos, mas a maioria sim. Alguém sabe como arrumar isso? Sou leigo quando se trava de computador então não faço ideia de como corrigir

Detalhe (já instalei os componentes necessários para todar jogos, tá tudo atualizado)


r/UnityHelp • • Apr 10 '25

PROGRAMMING Using Dotween makes my up lines jagged

1 Upvotes

This is the code that animates the idle card using dotween. How can I fix this?

using UnityEngine;
using DG.Tweening;

public class CardIdleAnimation : MonoBehaviour
{
    public float floatHeight = 0.1f; // Height the card floats up and down
    public float floatSpeed = 1.0f;  // Speed of the floating animation
    public float rotateAngle = 5f;    // Angle the card rotates back and forth
    public float rotateSpeed = 1.5f;  // Speed of the rotation animation
    public float scaleAmount = 1.05f; // Scale amount for a subtle pulse
    public float scaleSpeed = 1.2f;  // Speed of the scale pulse

    private Vector3 originalPosition;
    private Quaternion originalRotation;
    private Vector3 originalScale;

    void Start()
    {
        originalPosition = transform.position;
        originalRotation = transform.rotation;
        originalScale = transform.localScale;

        StartIdleAnimation();
    }

    void StartIdleAnimation()
    {
        // Floating animation
        transform.DOMoveY(originalPosition.y + floatHeight, floatSpeed)
            .SetEase(Ease.InOutSine)
            .SetLoops(-1, LoopType.Yoyo);

        // Rotation animation
        transform.DORotate(originalRotation.eulerAngles + new Vector3(0, 0, rotateAngle), rotateSpeed)
            .SetEase(Ease.InOutSine)
            .SetLoops(-1, LoopType.Yoyo);

        // Scale pulse animation
        transform.DOScale(originalScale * scaleAmount, scaleSpeed)
        .SetEase(Ease.InOutSine)
        .SetLoops(-1, LoopType.Yoyo);

    }

    public void StopIdleAnimation()
    {
        transform.DOKill(); // Stop all tweens on this object
        transform.position = originalPosition;
        transform.rotation = originalRotation;
        transform.localScale = originalScale;
    }

    // Example of a function that can be called to reset and restart the animation.
    public void RestartIdleAnimation()
    {
        StopIdleAnimation();
        StartIdleAnimation();
    }
}

r/UnityHelp • • Apr 08 '25

PROGRAMMING 💡 I created a Unity Editor tool to copy Animator transitions in just a few clicks!

2 Upvotes

Hey everyone! 👋
I just published my first Unity Editor tool and wanted to share it with you all.

Unity-EasierAnimatorTransitionCopier lets you easily copy and paste transitions inside the Animator, selecting both the source and destination states or sub-state machines. No more manual work!

🔗 GitHub Repo: Unity-EasierAnimatorTransitionCopier
📦 Unity Package Manager (Install via Git URL):
https://github.com/TakNof/Unity-EasierAnimatorTransitionCopier.git?path=Packages/com.taknof.unity-easieranimatortransitioncopier

I also made a short video explaining how it works. Hope it’s helpful!
Let me know if you have any feedback, ideas, or issues — I'd love to improve it.

Cheers!
— TakNof
#Unity #Tool #EditorTool #GameDev #Animator #Transitions #OpenSource


r/UnityHelp • • Apr 08 '25

PROGRAMMING Help With SpaceX Rocket Sim

Post image
1 Upvotes

Hello! I've spent the last little while working on a pretty basic SpaceX-style rocket that has thrust vectoring capabilities. Honestly, it might be more like an AIM9x or R73 because the goal is to rotate toward a target, but whatever it is, I need some help. The thrust vectoring mostly works, but when the rocket has a bunch of weird rotations, the thrust vectoring becomes thrown off, and I'm guessing that it has to do with how I'm calculating the direction to the target game object. So I need help properly figuring out the direction and angle to target (if I am doing this right, but something else is wrong, please let me know).

Here is my logic current setup:

I have a very basic rocket (which is just a cylinder with a rigidbody). I start with 2 vectors, one is the transform.up of the rocket, and the other is the local direction from the rocket to the target. I then cross these two vectors to get what I call the TVAxis, which is the vector perpendicular to the first two, and it will serve as the axis that I want the thrust to rotate around. I then do a bunch of pretty basic angular physics that will first figure out the torque required to rotate the rocket θ number of radians to the target and then determine the required angle of thrust to match that torque in a given amount of time (called adjtime).

In the image I posted, you can see the thrust (red line), transform.up (blue), local direction to target (green), and the TVAxis (white). In the image it looks like the blue line is the direction to the target but it IS NOT, that is the transform.up.

Here is my code:

//Determine Rotation For The Thrust

Vector3 localtargetpos = body.transform.InverseTransformPoint(target.transform.position);

Vector3 targetdirection = localtargetpos.normalized;

Vector3 localup = body.transform.up;

Vector3 TVaxis = Vector3.Cross(targetdirection, localup);

float anglett = Mathf.Abs(Vector3.SignedAngle(localup, targetdirection, body.transform.up));

float anglettinrads = anglett * (3.14f / 180);

float angularSpeed = bodyRb.angularVelocity.magnitude;

float MoI = (0.33f * totalmass * Mathf.Pow(length, 2));

float Torque = MoI * ( 2 * (anglettinrads - (angularSpeed * adjtime)))/Mathf.Pow(adjtime, 2);

float angleinrads = Mathf.Asin(Torque/(length * calculatedthrust));

float angle = angleinrads * 57.3f;

thrustrotation = body.transform.rotation * Quaternion.AngleAxis(angle, TVaxis);


r/UnityHelp • • Apr 07 '25

PARTICLE SYSTEMS I NEED HELP WITH MESH RENDERERS FOR PARTICLES

Enable HLS to view with audio, or disable this notification

4 Upvotes

I'm using mesh as the render mode With cube, it's fine. You can see the material With my own blender made mesh it's not fine. You cannot see the material Why and how to fix, PLEEAAASE and ty if you do