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

gameobject doesnt remember target when making prefab

$
0
0
hello.

I have a movetowards function. that is working fine when i have the object in the scene. But when i want to place the object in the assets > enemy's> kamikaze folder the target variable says none. so for some reason it doesnt remember it's target. why is that?

maybe something with my code wich i dont think but here it is anyway.
Code (CSharp):
  1. using UnityEngine;
  2. using System.Collections;
  3.  
  4. public class Kamikaze : MonoBehaviour {
  5.  
  6.     public GameObject target;
  7.     public float speed = 3;...
gameobject doesnt remember target when making prefab

Viewing all articles
Browse latest Browse all 1466670

Trending Articles



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