Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Join us on Thursday, June 8, for a Q&A with Unity's Content Pipeline group here on the forum, and on the Unity Discord, and discuss topics around Content Build, Import Workflows, Asset Database, and Addressables!
    Dismiss Notice

Script class?

Discussion in 'Immediate Mode GUI (IMGUI)' started by Nicky, Nov 26, 2007.

  1. Nicky

    Nicky

    Joined:
    Nov 12, 2007
    Posts:
    19
    Error message:

    "Please make sure the file name of the script is the same as the class defined inside it."

    What is the class inside the script?
     
  2. bronxbomber92

    bronxbomber92

    Joined:
    Nov 11, 2006
    Posts:
    888
    Are you using C# (or Boo) or Javascript?

    if it's c# the name of the script has to be the same name as the script

    Code (csharp):
    1. //Myclass.cs
    2.  
    3. using UnityEngine;
    4. using System.Collections;
    5.  
    6. public class Myclass : MonoBehaviour
    7. {
    8.      ....
    9. }
     
    tyler419, Timothy_8_ and f3rras like this.