Quantcast
Channel: Unity Forum
Viewing all articles
Browse latest Browse all 1466670

GetComponent().enable Not Working!!!

$
0
0
I have two scripts attached to my player. One is Movement (self-explanitory). The other handles the player encountering enemies (called Encounters). The Encounters detects if an enemy is within the player's collider range and if so is supposed to stop the player from moving, and ask if the player wants to battle the enemy. However, it's not disabling the Movement script component.

Code (CSharp):
  1. using UnityEngine;
  2. using System.Collections;
  3. using UnityEngine.UI;
  4.  
  5. public class Encounter :...
GetComponent<>().enable Not Working!!!

Viewing all articles
Browse latest Browse all 1466670

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>