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 RedicionStudio · Oct 24, 2016 at 04:00 PM · unity 5errorcodepage

I need help with a error: APIUpdaterRuntimeServices

Hello i need your help. Do you know how can i fix this error:

Video(please watch the video, i show the error.): https://www.youtube.com/watch?v=JY2WbA-rm78

Here are the code:

UnityEngineInternal.APIUpdaterRuntimeServices.AddComponent (obj, "Assets/RoyalDio/Scripts/GamePlay/Quest/Base/PlayerQuestManager.cs (46,5)", questList [i]);

I hope you can help. Thanks in advance Florian

And here are all codes in the file:

/// /// Quest manager. Add into Player Character this class Contain a Quest management function such as AddQuest , RemoveQuest , Checking or etc.. /// using UnityEngine; using System.Collections; using System.Collections.Generic;

public class PlayerQuestManager : MonoBehaviour {

 public GUISkin skin;
 public GameObject TextFloating;
 public List<QuestBase> Quests = new List<QuestBase> ();
 public PlayerManager Player;

 void Start ()
 {
     StyleManager StyleManage = (StyleManager)GameObject.FindObjectOfType (typeof(StyleManager));
     if (StyleManage) {
         skin = StyleManage.GetSkin (0);
     }
     
 }
 
 public void SaveQuests (string name)
 {
     string quest_list = "";
     for (int i=0; i<Quests.Count; i++) {
         if (Quests [i] != null) {
             Quests [i].SaveQuest (name);
             quest_list += Quests [i].GetType() + "|";
         }
     }
     Debug.Log ("Name Quests " + quest_list);
     PlayerPrefs.SetString ("QUEST_" + name, quest_list);
 }
 
 public void LoadQuests (string name)
 {
     string[] questList = PlayerPrefs.GetString ("QUEST_" + name).Split ("|" [0]);
     Quests.Clear();
     for (int i=0; i<questList.Length; i++) {
         if (questList [i] != "") {
             Debug.Log ("Add quest " + questList [i]);
             GameObject obj = new GameObject(questList [i]);
             UnityEngineInternal.APIUpdaterRuntimeServices.AddComponent (obj, "Assets/RoyalDio/Scripts/GamePlay/Quest/Base/PlayerQuestManager.cs (46,5)", questList [i]);
             Quests.Add (obj.GetComponent<QuestBase>());
         }
     }
     for (int i=0; i<Quests.Count; i++) {
         if (Quests [i] != null) {
             Quests [i].LoadQuest(name);
             Quests [i].Info();
             Quests [i].Checking();
         }
     }
 }
 
 public bool QuestHavedCheck (QuestBase quest)
 {
     bool res = false;
     for (int i=0; i<Quests.Count; i++) {
         if (Quests [i] != null) {
             if (Quests [i].GetType() == quest.GetType()) {
                 res = true;
                 break;    
             }
         }
     }
     return res;
 }
 public QuestBase GetExistQuest (QuestBase refQuest)
 {
     for (int i=0; i<Quests.Count; i++) {
         if (Quests [i] != null) {
             if (Quests [i].GetType() == refQuest.GetType()) {
                 return Quests [i];
             }
         }
     }
     return refQuest;
 }
 
 public void QuestPreparing (QuestBase quest)
 {
     quest.Info ();
 }
 
 public void AddQuest (QuestBase quest)
 {
     
     if (!QuestHavedCheck (quest) && Player) {
         Debug.Log ("Add Quest " + quest.QuestName);
         if(quest.Player)
         addText ("Quest " + quest.QuestName + " Accepted",quest.Player.transform.position);
         quest.Initialize (Player);
         Quests.Add (quest);
     }
 }
 
 public void RemoveQuest (QuestBase quest)
 {
     if (QuestHavedCheck (quest)) {
         Debug.Log ("Remove Quest " + quest.QuestName);
         Quests.Remove (quest);
     }
 }
 
 public void ReadEventMessage (string message)
 {
     for (int i=0; i<Quests.Count; i++) {
         if (Quests [i] != null) {
             Quests [i].ActioneMessage (message);
         }
     }
 }
 
 public void QuestCompleteCheck (QuestBase quest)
 {
     Debug.Log ("Quest Check");
     for (int i=0; i<Quests.Count; i++) {
         if (Quests [i] != null) {
             if (Quests [i] == quest) {
                 if (Quests [i].IsSuccess) {
                     Quests [i].Rewarded ();
                     if (TextFloating) {
                         if(Quests[i].Player)
                         addText ("Quest Complete",Quests[i].Player.transform.position);
                     }
                     RemoveQuest (Quests [i]);
                 }
             }
         }
     }
 }
 
 void Update ()
 {
     if(!Player){
         Player = (PlayerManager)GameObject.FindObjectOfType(typeof(PlayerManager));
     }
     
     for (int i=0; i<Quests.Count; i++) {
         if (Quests [i] != null) {
             Quests [i].Player = Player;
             Quests [i].UpdateQuest ();
         }
     }
 }
 
 void addText (string text,Vector3 pos)
 {
     if (TextFloating) {
         GameObject floattext = (GameObject)GameObject.Instantiate (TextFloating,pos, Quaternion.identity);    
         floattext.GetComponent<FloatingText> ().Text = text;
     }    
 }

 void OnGUI ()
 {
     if (skin)
         GUI.skin = skin;
 }

 public void DrawQuestList ()
 {
     if (Quests.Count > 0) {
         GUI.skin.label.fontSize = 16;
         GUI.skin.label.normal.textColor = Color.white;
         GUI.skin.label.alignment = TextAnchor.UpperRight;
         GUI.Label (new Rect (Screen.width - 350, 110, 300, 30), "Quests");
     }
     for (int i=0; i<Quests.Count; i++) {
         if (Quests [i] != null) {
             DrawQuest (Quests [i], new Vector2 (Screen.width - 350, 140 + (i * 30)));
         }
     }
 }

 public void DrawQuest (QuestBase quest, Vector2 position)
 {
     
     if (quest.IsSuccess) {
         GUI.skin.label.normal.textColor = Color.green;
     } else {
         GUI.skin.label.normal.textColor = Color.yellow;
     }
     
     GUI.Label (new Rect (position.x, position.y, 300, 30), quest.QuestDisplay);
 }

}

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 RedicionStudio · Oct 24, 2016 at 04:03 PM

And i use Unity 5.3.4f1.

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

127 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 avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

"Level Manager" trying to update deprecated code 1 Answer

Getting an error: Assertion failed on expression: 'SUCCEEDED(hr)' 5 Answers

Why is my instance removed by Unity? 1 Answer

"error CS1525: Unexpected symbol `end-of-file' " I've tried everything.... 1 Answer

Unity 2017 or 5.6 Doesn't work after install. Editor is broken. 0 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