Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
  • Help Room /
avatar image
0
Question by Mikhail-Sholokhov · Mar 16, 2017 at 06:24 PM · scripting problemscript.script errorhow

error CS0246

Hello! An error appears on the build. The error string - using UnityEditor;

Here's the script:

 using UnityEngine;
 using System.Collections;
 using UnityEditor;
 
 
 [CustomEditor (typeof(VehicleSelect))][CanEditMultipleObjects]
 public class VehicleSelectEditor : Editor
 {
     public override void OnInspectorGUI ()
     {
 
         serializedObject.Update ();
 
         EditorGUILayout.Space ();
 
         GUI.color = Color.green;
         EditorGUILayout.Space ();
         EditorGUILayout.HelpBox ("\n                           Vehicle Select System\n", MessageType.None);
         EditorGUILayout.Space ();
         GUI.color = Color.white;
 
 
 
 
 
 
         EditorGUILayout.HelpBox ("List of the cars", MessageType.None);
 
         EditorGUILayout.PropertyField (serializedObject.FindProperty ("vehicles"),
             new GUIContent ("Vehicles", "Drag youre car prefabs"), true);
 
         EditorGUILayout.Space ();
 
         EditorGUILayout.HelpBox ("Vehicle spawn point", MessageType.None);
         EditorGUILayout.PropertyField (serializedObject.FindProperty ("point"),
             new GUIContent ("Spawn Point", "Drag spawn point transform"), true);
         EditorGUILayout.Space ();
 
 
 
         EditorGUILayout.HelpBox ("List of the car prices", MessageType.None);
         EditorGUILayout.PropertyField (serializedObject.FindProperty ("Lock"),
             new GUIContent ("Lock Icon", ""), true);
         EditorGUILayout.Space ();
         EditorGUILayout.PropertyField (serializedObject.FindProperty ("LevelNumText"),
             new GUIContent ("Level Unlock Text", ""), true);
         EditorGUILayout.Space ();
         EditorGUILayout.PropertyField (serializedObject.FindProperty ("carsLevels"),
             new GUIContent ("Ech Car LevelUP Need", ""), true);
         EditorGUILayout.Space ();
 
 
         EditorGUILayout.HelpBox ("Icon - Button - Shop", MessageType.None);
         EditorGUILayout.PropertyField (serializedObject.FindProperty ("Lock"),
             new GUIContent ("Lock Icon", "Drag lock icon image   "), true);
         EditorGUILayout.PropertyField (serializedObject.FindProperty ("Shop"),
             new GUIContent ("Shop Window", "Drag Shop Window image   "), true);
 
         EditorGUILayout.PropertyField (serializedObject.FindProperty ("Buy"),
             new GUIContent ("Buy Button", "Buy Button Object   "), true);
         EditorGUILayout.Space ();
 
         EditorGUILayout.PropertyField (serializedObject.FindProperty ("vehiclePriceText"),
             new GUIContent ("Vehicle Price Text", "Drag Vehicle Price Text   "), true);
         EditorGUILayout.Space ();
 
 
 
         EditorGUILayout.HelpBox ("Main Level Name", MessageType.None);
         EditorGUILayout.PropertyField (serializedObject.FindProperty ("levelName"),
             new GUIContent ("Level Name ", "Enter Main Scene Day Mode Name  "), true);
         EditorGUILayout.Space ();
 
         EditorGUILayout.HelpBox ("Loading Window", MessageType.None);
         EditorGUILayout.PropertyField (serializedObject.FindProperty ("Loading"),
             new GUIContent ("Loading Object", "Drag Loading GameObject  "), true);
         EditorGUILayout.Space ();
 
         EditorGUILayout.HelpBox ("Customization", MessageType.None);
 
         EditorGUILayout.PropertyField (serializedObject.FindProperty ("mainMenu"),
             new GUIContent ("Main Menu", "Drag RingSport Component  "), true);
         EditorGUILayout.PropertyField (serializedObject.FindProperty ("customizeMenu"),
             new GUIContent ("Customize Menu", "Drag RingSport Component  "), true);
         EditorGUILayout.PropertyField (serializedObject.FindProperty ("selectButtons"),
             new GUIContent ("Select Buttons", "Drag RingSport Component  "), true);
 
         serializedObject.ApplyModifiedProperties ();
 
     }
 
 }
 



Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by Commoble · Mar 16, 2017 at 06:42 PM

To paraphrase part of your error message

The type or namespace name 'type/namespace' could not be found (are you missing a using directive or an assembly reference?)

Your actual error message will tell you the line in your script that this occurred in, as well as which invalid type or namespace you tried to use. Usually this is a spelling error, and it'll typically be highlighted in red in your IDE (e.g. MonoDevelop). Alternatively, you could be missing a using directive.

This is generally one of the simplest errors to fix, so you should be able to figure out what you did wrong just by looking at your error message, and at the line in your script that your error message mentions. Once you've tried this, if you still can't figure it out, we'll need to see the whole error message you got, as the information within it is extremely useful to anyone trying to solve the error (including yourself).

Comment
Add comment · Show 2 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Mikhail-Sholokhov · Mar 16, 2017 at 11:20 PM 0
Share

In my editor does not show an error in the line, the first line of UsingEditor

avatar image Mikhail-Sholokhov · Mar 18, 2017 at 10:41 PM 0
Share

You can give your mail?

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

119 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Unity {[(2D)]} RotateAround while jumping 0 Answers

The referenced script on this Behaviour is missing - on any new script 0 Answers

Light not instantiate after a time 0 Answers

My gameobject keeps leaving the screen 0 Answers

stealth Frezz when "hit&" play bttn 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges