CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Jun 2015
    Posts
    1

    C# Script compile error in unity

    I have this code.
    Code:
    using UnityEngine;
    using System.Collections;
    
    public class Spawner : MonoBehaviour {
    
    	public GameObject [] groups ;
    
    	void start(){
    		spawnNext ();
    	}
    
    	void spawnNext () {
    		int i = Random.Range (0, groups.Length);
    		
    		Increment (groups[i],
    		           transform.position,
    		           Quaternion.identity); 
    	}
    }
    This program is supposed to take a prefab block and spawn it at the top of my screen, like in Tetris. However, when I run it in Unity it says that there is a compiler error. Is there something wrong with my program or with unity?

  2. #2
    Arjay's Avatar
    Arjay is offline Moderator / EX MS MVP Power Poster
    Join Date
    Aug 2004
    Posts
    13,490

    Re: C# Script compile error in unity

    Quote Originally Posted by DeathFromAbove View Post
    However, when I run it in Unity it says that there is a compiler error. Is there something wrong with my program or with unity?
    There is something wrong with your post because you neglected to include the error.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured