Hi, I need help on - you guessed it - disabling a script using another script in C#.
I want the playermovement thing to appear in Unity so I can reference it with my PlayerMovement script, but it doesn’t appear. Any help? PLEASE?
Tip: I’m a noob and got this off a tutorial. For some reason it worked for who made the tutorial, but it didn’t work for me.
Here’s my code:
using UnityEngine;
public class PlayerCollision : MonoBehaviour
{
public PlayerMovement movementtrash;
void OnCollsionEnter(Collision collisionInfo)
{
if (collisionInfo.collider.tag == "Obstacle")
{
movementtrash.enabled = false;
}
}
}
I need a way to make the PlayerMovement appear in unity so I can reference it with my script and disable it. If you have questions, ask right ahead, I seriously need help.