Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 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 /
This question was closed Nov 15, 2014 at 12:53 AM by Bunny83 for the following reason:

Problem is not reproducible or outdated

avatar image
0
Question by Hydravolt · Nov 14, 2014 at 05:57 AM · c#enum

Enum has "Unknown resolve error"

In my code, I have an enum that says the keyword is Unknown resolve error. The enum can't be used, and doesn't exist.

 using UnityEngine;
 using System.Collections;
 
 public class BaseWeapon : BaseStatItem {
 
     public enum WeaponTypes{
         SWORD,
         STAFF,
         DAGGER,
         BOW,
         SHEILD,
         POLEARM
     }
 
     private WeaponTypes weaponType;
 
     public WeaponTypes WeaponType
     {
         get{return weaponType;}
         set{weaponType = value;}
     }
 }

Can someone please help? I'm following this video and I have no clue what I'm doing wrong.

Unity 4.5.5f1 MonoDevelop 4.0.1

Comment
Add comment · Show 3
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 Bunny83 · Nov 14, 2014 at 06:25 AM 1
Share

Your piece of code works fine. There has to be something else in the project that produces this error. Are you actually sure it's in this file? Could you please copy the exact error message from the console and tell us which line it's complaining?

I can copy this right into a script and it compiles without any problems. Are you sure you didn't call another enum "WeaponTypes", maybe in one of the baseclasses?

avatar image Kiwasi · Nov 14, 2014 at 06:29 AM 0
Share

Script compiles perfectly on my PC.

avatar image Jeff-Kesselman · Nov 15, 2014 at 12:41 AM 0
Share

Never paraphrase the error in a question. If you don't understand it, then you don't know what is important about it.

Show us the entire error message, as printed by Unity, or we cannot help very much,

1 Reply

  • Sort: 
avatar image
0
Best Answer

Answer by Hydravolt · Nov 15, 2014 at 12:47 AM

Really Sory, but after my PC crashed everything worked fine. The errors were all in Mono, I didn't even need to go into Unity to see them. It was all because of that Unknown resolve error, which I can't recreate. Can anyone tell me what Unknown resolve error even means?

Comment
Add comment · Show 3 · 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 Jeff-Kesselman · Nov 15, 2014 at 12:42 AM 0
Share

Not without seeing the entire error message.

avatar image Bunny83 · Nov 15, 2014 at 12:53 AM 1
Share

The compiler simply can't reslove a name since it's unknown for some reason. One reason could be that the C# solution / project file was corrupt / missing when you viewed that file. So it might miss all the assembly references and references to other scripts in your project.

To be honest i have the feeling some people are a little bit too quick in posting a question here. Usually before posting a question you do "what you can" to solve a problem yourself. Things like closing and reopening $$anonymous$$onoDev. and or Unity should be something quite early in the list of thing you might want to try. Especially if you get a rare error where you don't find much information about. (did you even search ?!?)

avatar image Jeff-Kesselman · Nov 15, 2014 at 01:16 AM 0
Share

Or before they have read a basic C# book.

These forums aren't to write your code for you or to $$anonymous$$ch you C#. There are lots of resources for the latter, and you should do you own work for the former. At least read and work the Goldstone book.

http://www.amazon.com/Unity-Game-Development-Essentials-Goldstone/dp/184719818X/ref=sr_1_15?s=books&ie=UTF8&qid=1416014607&sr=1-15&keywords=unity+3d&pebp=1416014613081

Follow this Question

Answers Answers and Comments

5 People are following this question.

avatar image avatar image avatar image avatar image avatar image

Related Questions

Multiple Cars not working 1 Answer

Distribute terrain in zones 3 Answers

Changing the direction of a prefab when colliding with an object 0 Answers

Illuminating a 3D object's edges OnMouseOver (script in c#)? 1 Answer

NPC Class looking for help 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