Hey! iam trying to fill a public Transform with a Gameobject of another script.
here is the target script which
using UnityEngine;
using System.Collections;
using LE_LevelEditor.Core;
public class CArSmoothFollow : MonoBehaviour {
public Transform target;
void Start () {
target = GameObject.Find("GameLogic").GetComponent<ExampleGame_Game>().TestCar.transform;
}
and this is the script whit the gameobject i want to adress (inside a Gameobject called “GameLogic”):
using UnityEngine;
using LE_LevelEditor.Core;
using System.Collections;
namespace LE_LevelEditor.Example
{
public class ExampleGame_Game : MonoBehaviour
{
public GameObject TestCar;
.
.
.
but all i get is the error:
Assets/CArSmoothFollow.cs(40,68): error CS0246: The type or namespace name `ExampleGame_Game’ could not be found. Are you missing a using directive or an assembly reference?