Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 14 Next capture
2021 2022 2023
2 captures
13 Jun 22 - 14 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 /
avatar image
2
Question by ZorroMask · Jan 05, 2012 at 12:40 PM · create

Error when init a scriptableWizard

I am trying to create my own ScriptableWizard , I put my code at the folder Assets/Editor , the file name is the same with the class name. But when I open it using a menu item ,I got the error:

 Instance of MyScriptableWizard couldn't be created because there is no script with that name.
 UnityEditor.ScriptableWizard:DisplayWizard(String, Type)
 MyScriptableWizard:CreateWizard() (at Assets/Editor/MyScriptableWizard .cs:24)


Here is code:

 using UnityEngine;
 using UnityEditor;
 using System.Collections;
 
 // A Wizard class that generates it's fields from public properties
 public class MyScriptableWizard : ScriptableWizard
 {
     //---------------------------------
     // Reflection Fields
     //---------------------------------
  
     // An auto generated field
     public string myGeneratedField;
  
     //---------------------------------
     // Static Methods
     //---------------------------------
  
     // Create the wizard
     [MenuItem ("GameObject/Wizards/My Scriptable Wizard")]
     static void CreateWizard ()
     {
         MyScriptableWizard wizard = DisplayWizard<MyScriptableWizard>("My Scriptable Wizard", "Wizard Create", "Wizard Other Button");

     }
  
     //==================================
     // Messages
     //==================================
  
  
     // Called every frame when the wizard is visible.
     void OnDrawGizmos()
     {
  
     }
  
     // This is called when the user clicks on the Create button.
     void OnWizardCreate()
     {
  
     }
  
     // This is called when the wizard is opened or whenever the user 
     // changes something in the wizard.
     void OnWizardUpdate()
     {
  
     }
  
     // Allows you to provide an action when the user clicks on the 
     // other button.
     void onWizardOtherButton()
     {
     }
 }
Comment
Add comment · Show 1
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 Kaldrin · Mar 17, 2021 at 12:08 PM 0
Share

And for me it wasn't working because not in the Editor folder, thanks for pointing it out

2 Replies

· Add your reply
  • Sort: 
avatar image
0

Answer by Bunny83 · Jan 05, 2012 at 01:57 PM

Like all Unity derived classes the filename of the script have to match the classname.

 MyScriptableWizard.cs
Comment
Add comment · Show 1 · 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 ZorroMask · Jan 06, 2012 at 02:51 AM 0
Share

Thanks for your help ,I found there is a space at the last of the class name....

avatar image
0

Answer by Chris_Entropy · Feb 08, 2017 at 03:30 PM

Had this error as well. In my case I had tried to display a scriptable wizard derived class, which was marked as "abstract". This is not supported, as it seems (was also not intended by me), but it is not shown properly in the error message.

Comment
Add comment · 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

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

7 People are following this question.

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

Related Questions

The name 'Joystick' does not denote a valid type ('not found') 2 Answers

Creating object as a child in group by script 2 Answers

Can someone help me fix my Javascript for Flickering Light? 6 Answers

Setting Scroll View Width GUILayout 1 Answer

Material doesn't have a color property '_Color' 4 Answers


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