Question by
Bullorus · Sep 19, 2015 at 08:43 AM ·
2derrormoving platform
Object Reference not set to an instance of an object for Moving Platform
When I try to enter a trigger on a moving platform to let the platform move, it says "Object reference not set to an instance of an object" when I enter the trigger. Here is my code:
using UnityEngine; using System.Collections;
public class Finals : MonoBehaviour {
void OnTriggerEnter2D(Collider2D other) {
if (other.tag == "Player") {
StartMove ();
}
}
public void StartMove() {
iTween.MoveTo(gameObject, iTween.Hash("x", transform.position.x + 20, "time", 20, iTween.EaseType.easeInOutSine,"delay",1));
}
}
Comment
Your answer
Follow this Question
Related Questions
I would like to output a 2D particle effect purchased in Unity as a video or GIF to my desktop. 0 Answers
How to make so that the player can jump on a object, but he can't stand on it? (2D) 0 Answers
C# Script - Erro CS8025: Parsing error 1 Answer
ArgumentOutOfRangeException: Argument is out of range error when used with for loop 1 Answer
"com.google.common.base.verifyexception" Can't build my android game 0 Answers