{"action":"closed","issue":{"url":"https://api.github.com/repos/SkylinesModding/Docs/issues/9","labels_url":"https://api.github.com/repos/SkylinesModding/Docs/issues/9/labels{/name}","comments_url":"https://api.github.com/repos/SkylinesModding/Docs/issues/9/comments","events_url":"https://api.github.com/repos/SkylinesModding/Docs/issues/9/events","html_url":"https://github.com/SkylinesModding/Docs/issues/9","id":65658108,"number":9,"title":"Adding UI won't work","user":{"login":"Gurkenschreck","id":11715759,"avatar_url":"https://avatars.githubusercontent.com/u/11715759?v=3","gravatar_id":"","url":"https://api.github.com/users/Gurkenschreck","html_url":"https://github.com/Gurkenschreck","followers_url":"https://api.github.com/users/Gurkenschreck/followers","following_url":"https://api.github.com/users/Gurkenschreck/following{/other_user}","gists_url":"https://api.github.com/users/Gurkenschreck/gists{/gist_id}","starred_url":"https://api.github.com/users/Gurkenschreck/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Gurkenschreck/subscriptions","organizations_url":"https://api.github.com/users/Gurkenschreck/orgs","repos_url":"https://api.github.com/users/Gurkenschreck/repos","events_url":"https://api.github.com/users/Gurkenschreck/events{/privacy}","received_events_url":"https://api.github.com/users/Gurkenschreck/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-04-01T10:50:32Z","updated_at":"2015-04-04T04:41:40Z","closed_at":"2015-04-04T04:41:40Z","body":"Hello,\r\nI have an issue with the Adding UI approach. Since I am new to all this unity stuff, I have no Idea how to do a UI. The docs look easy, but it won't work. In my class's (which inherited LoadingExtensionBase) in the OnLevelLoaded(LoadMode mode) Method, I have the following statement:\r\n\r\nUIView v = UIView.GetAView();\r\nUIComponent uiComponent = v.AddUIComponent(typeof(ConfigurationPanel)); //exception\r\n\r\nJust like in the docs.\r\nThe problem is that when I load the map, it thows a null-exception. v is not null, I checked it. if(v != null)...\r\nI cannot understand why it is throwing this error, I hope you can help me.\r\nOr could you tell me a different approach on how to create a UI (I neew a panel with some labels and buttons).\r\n\r\nMy ConfigurationPanel.cs\r\nclass ConfigurationPanel : UIPanel //Testing\r\n    {\r\n        public override void Start()\r\n        {\r\n            Log.MessageUnity(\"Configuration panel start.\");\r\n            SimulationManager.instance.ForcedSimulationPaused = true;\r\n            try\r\n            {\r\n                //Configures this window\r\n                this.backgroundSprite = \"GenericPanel\";\r\n                this.color = new Color32(255, 0, 0, 100);\r\n                this.width = 300;\r\n                this.height = 500;\r\n                //this.position = new Vector3(Screen.width / 2, Screen.height / 2);\r\n            }\r\n            catch (Exception ex)\r\n            {\r\n                Log.ErrorUnity(\"ABC\" + ex.ToString());\r\n            }\r\n        }\r\n    }\r\n\r\nYou can also contact me under gurkenschreck@kampfverband-fuchs.de\r\nThank you for your attention."}}