I am getting Error CS0119: Expression denotes a 'value', where a 'method group' was expected.
i am using Unity 2.5
My code:
using UnityEngine;
using System.Collections;
public class BallScript : MonoBehaviour
{
// Use this for initialization
void Start ()
{
}
// Update is called once per frame
void Update ()
{
}
public void Die()
{
Destroy( gameObject );
GameObject paddleObject = GameObject.Find ("Paddle");
PaddleScript paddleScript = paddleObject.GetComponent(typeof(PaddleScript))();
paddleScript.SpawnBall();
}
}
↧