# Serious problem

**URL:** https://discussions.unity.com/t/serious-problem/387713
**Category:** Unity Editor
**Created:** [February 13, 2009, 7:18pm UTC](https://discussions.unity.com/t/serious-problem/387713 "2009-02-13T19:18:20Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![anon\_22068307](https://avatars.discourse-cdn.com/v4/letter/a/3be4f8/32.png) [@anon\_22068307](https://discussions.unity.com/u/anon_22068307)
#### Post date: [February 13, 2009, 7:18pm UTC](https://discussions.unity.com/t/serious-problem/387713/1 "2009-02-13T19:18:20Z")

</div>

I working in small game project.And once upon a time my function OnGUI ceased to update anything i wrote .And now in detail.I had single javaScript in my project with OnGUI function. Like this

static var score : int=10;

functoin OnGUI(){  
GUI.Label(Rect(10,10,100,30),"game score = " +score);  
}  
Today I have wanted to change my GUI.label and i chenge it to GUI.Label(Rect(10,10,100,30),"SCORE = " +score); ,press “Save” compile etc… press “Play” in editor ,and i see in Editor window SCORE = 10 here is everything is O.K.,but when i have build my game in WebPlayer, on screen appeared aging GUI string “game score = 10”,but score value “static var score” still updating when im killing anemies so i saw “game score = 11” , "“game score = 12” …etc.Afterwards I have tried to completely delete line " GUI.Label(Rect(10,10,100,30),"game score = " +score); "-nothing happend :(,then I have tried to create new scene,and new javascript like “test.js” ,and insert there a trivial function :  
function OnGUI(){  
GUI.Label(Rect(10,10,100,100),“asdasd”);  
}  
Attach script to the epmty gameObject ,Save,compile ,press Play…-in Editor averything ok,it is seen “asdasd” in the screen,but after export to WebPlayer or,Windows,Macos-nothing happend again,Empty screen :((  
After whole of this I created new project,and do the same steps → function OnGUI(){  
GUI.Label(Rect(10,10,100,100),“asdasd”);  
}  
attached to the empty gameobject,pressing Play-everything fine in editor,then i export ,and everything fine in WebPlayer !! I see my “asdasdasd” in WEbPlayer now !!!  
How can i save my old project where OnGUI doesnt work :((

---

<div class="post-metadata">

### Author: ![antenna-tree](https://dub1.discourse-cdn.com/unity/user_avatar/discussions.unity.com/antenna-tree/32/244386_2.png) [@antenna-tree](https://discussions.unity.com/u/antenna-tree)
#### Post date: [February 13, 2009, 9:58pm UTC](https://discussions.unity.com/t/serious-problem/387713/2 "2009-02-13T21:58:00Z")

</div>

This is a bit of a jumbled mess and pretty hard to read… try encapsulating your code into tags so that it’s easier to tell what you’re talking about.

Ethan

---

<div class="post-metadata">

### Author: ![monark](https://dub1.discourse-cdn.com/unity/user_avatar/discussions.unity.com/monark/32/87191_2.png) [@monark](https://discussions.unity.com/u/monark)
#### Post date: [February 14, 2009, 8:58am UTC](https://discussions.unity.com/t/serious-problem/387713/3 "2009-02-14T08:58:05Z")

</div>

You could try exporting the old project as an asset package and then import it into a new project.

---

<div class="post-metadata">

### Author: ![anon\_22068307](https://avatars.discourse-cdn.com/v4/letter/a/3be4f8/32.png) [@anon\_22068307](https://discussions.unity.com/u/anon_22068307)
#### Post date: [February 14, 2009, 9:17am UTC](https://discussions.unity.com/t/serious-problem/387713/4 "2009-02-14T09:17:25Z")

</div>

Ok thanks all ) i found the problem,I have accidentally exported build into project folder,and everything became bad for me. :lol: :lol: :lol:I think some classes were simply duplicated in the project and this became root of the discord. :twisted:
