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 /
This post has been wikified, any user with enough reputation can edit it.
avatar image
0
Question by bigboss96 · Jan 18, 2016 at 09:08 AM · error message

How to fix error CS0029: Cannot implicitly convert type `Unitycoding.CharacterSystem.Character' to `Character'

HI All guy, I have a question about Unity. I have this script but it doesn't seem to completely work

I have a few errors im not sure how to fix this problem..........

(If your able to fix this error, TY!) . . .

/GetCharacterInfo.cs(36,25): error CS0029: Cannot implicitly convert type Unitycoding.CharacterSystem.Character' to Character'

/GetCharacterInfo.cs(39,44): error CS1061: Type Character' does not contain a definition for onChange' and no extension method onChange' of type Character' could be found (are you missing a using directive or an assembly reference?)

/GetCharacterInfo.cs(47,44): error CS1061: Type Character' does not contain a definition for onChange' and no extension method onChange' of type Character' could be found (are you missing a using directive or an assembly reference?)

/GetCharacterInfo.cs(52,48): error CS1061: Type Character' does not contain a definition for Name' and no extension method Name' of type Character' could be found (are you missing a using directive or an assembly reference?)

/GetCharacterInfo.cs(53,48): error CS1061: Type Character' does not contain a definition for Gender' and no extension method Gender' of type Character' could be found (are you missing a using directive or an assembly reference?)

/GetCharacterInfo.cs(54,53): error CS1061: Type Character' does not contain a definition for Description' and no extension method Description' of type Character' could be found (are you missing a using directive or an assembly reference?)

/GetCharacterInfo.cs(55,47): error CS1061: Type Character' does not contain a definition for CharacterName' and no extension method CharacterName' of type Character' could be found (are you missing a using directive or an assembly reference?)

/GetCharacterInfo.cs(56,59): error CS1061: Type Character' does not contain a definition for RuntimeGameObject' and no extension method RuntimeGameObject' of type Character' could be found (are you missing a using directive or an assembly reference?)

 #if ICODE
 using UnityEngine;
 using System.Collections;
 using Unitycoding;
 using Unitycoding.CharacterSystem;
 
 namespace ICode.Actions.CharacterSystem{
     [Category("Character System")]    
     [Tooltip("Get selected character information.")]
     [System.Serializable]
     public class GetCharacterInfo : StateAction {
         [Shared]
         [NotRequired]
         [InspectorLabel("Class")]
         public FsmString _class;
         [Shared]
         [NotRequired]
         public FsmString gender;
         [Shared]
         [NotRequired]
         public FsmString description;
         [Shared]
         [NotRequired]
         [InspectorLabel("Name")]
         public FsmString _name;
         [Shared]
         [NotRequired]
         public FsmGameObject runtimeGameObject;
         [Tooltip("Stop to update the character on exit of the state.")]
         public FsmBool stopOnExit;
 
         private Character mCharacter;
 
         public override void OnEnter ()
         {
             mCharacter = Unitycoding.CharacterSystem.CharacterSystem.selectedCharacter;
             if (mCharacter != null) {
                 OnCharacterChange(mCharacter);
                 mCharacter.onChange.AddListener(OnCharacterChange);
             }
             Finish ();
         }
 
         public override void OnExit ()
         {
             if (mCharacter != null && stopOnExit.Value) {
                 mCharacter.onChange.RemoveListener(OnCharacterChange);
             }
         }
 
         private void OnCharacterChange(Character character){
             _class.Value=character.Name;
             gender.Value=character.Gender.ToString();
             description.Value=character.Description;
             _name.Value=character.CharacterName;
             runtimeGameObject.Value=character.RuntimeGameObject;
         }
         
     }
 }
 #endif
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 Hellium · Jan 15, 2016 at 07:58 PM 0
Share

Have you tried to declare mCharacter as an instance of Unitycoding.CharacterSystem.Character and not simply Character ?

avatar image bigboss96 Hellium · Jan 15, 2016 at 08:18 PM 0
Share

How would I do that?

avatar image Hellium bigboss96 · Jan 15, 2016 at 09:27 PM 0
Share

private Unitycoding.CharacterSystem.Character mCharacter

0 Replies

· Add your reply
  • Sort: 

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

4 People are following this question.

avatar image avatar image avatar image avatar image

Related Questions

Navmesh spam console when desactivated 1 Answer

Failed extracting collision mesh error 0 Answers

unity 5.6 webgl error when run project,error CS0117: `UnityEngine.Application' does not contain a definition for `WebGLPlayer' 0 Answers

Scripting problem 1 Answer

Required API level 26, android sdk 2 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