Unity 3 pro, stripping and onGUI

Just discovered, that an ongui construct doesn´t work any more in unity3 when using stripping.

Error Message in xCode:

MissingMethodException: Method not found: 'Default constructor not found...ctor() of UnityEngine.GUI+ScrollViewState'.
  at System.Activator.CreateInstance (System.Type type, Boolean nonPublic) [0x00000] in <filename unknown>:0 
  at System.Activator.CreateInstance (System.Type type) [0x00000] in <filename unknown>:0 
  at UnityEngine.IDList.GetStateObject (System.Type t, Int32 controlID) [0x00000] in <filename unknown>:0 
  at UnityEngine.GUIUtility.GetStateObject (System.Type t, Int32 controlID) [0x00000] in <filename unknown>:0 
  at UnityEngine.GUI.BeginScrollView (Rect position, Vector2 scrollPosition, Rect viewRect, Boolean alwaysShowHorizontal, Boolean alwaysShowVertical, UnityEngine.GUIStyle horizontalScrollbar, UnityEngine.GUIStyle verticalScrollbar, UnityEngine.GUIStyle background) [0x00000] in <filename unknown>:0 
  at UnityEngine.GUI.BeginScrollView (Rect position, Vector2 scrollPosition, Rect viewRect) [0x00000] in <filename unknown>:0 
  at HelpGroup.OnGUI () [0x00000] in <filename unknown>:0 
 
(Filename:  Line: -1)

this is inside a c script like this:

using UnityEngine;
using System.Collections;

public class HelpGroup : MonoBehaviour {

	private Vector2 scrollPos = Vector2.zero;
	private float scrollPositionTextDelta = 0f;
	private Rect scrollPosRect;
	private Rect scrollContentRect;
	private Rect scrollContentSize;
	private Texture2D textureToScroll;
	public GUISkin scrollGuiSkin;

void OnGUI () {
	
		GUI.skin = scrollGuiSkin;
        		
		scrollPos = GUI.BeginScrollView (scrollPosRect, scrollPos, scrollContentRect); 
		if (GetPreferences.useHD == true) {
			
			GUI.DrawTexture(scrollContentSize, textureToScroll, ScaleMode.ScaleToFit, true, 0.5f);
		} else {
			GUI.Label(scrollContentSize, textureToScroll);
		}

      	GUI.EndScrollView();
	}

the same works, when stripping is disabled. Anybody had something like this before?

Edit:
Ok, the problem persists even when i stripp the onGUI function down to:

void OnGUI () {
	GUI.BeginScrollView (scrollPosRect, scrollPos, scrollContentRect); 	
      	GUI.EndScrollView();
}

however, when i dont use the ScrollView but use other GUI things there is no problem. Example:

void OnGUI () {
	GUI.DrawTexture(scrollContentSize, textureToScroll, ScaleMode.ScaleToFit, true, 0.5f);
}

Unfortunatly this goes down to the most simple stripping methode, so i cannot strip code at all.

Settings were roughly, ARMv6, .net2 subset and stripping: any methode.

known bug.

Scrollview + stripping = dead

Dreamorama:
Whow, superquick.

As for the answer: Stripping: I am loving it. Not. :frowning:

Ähm, how do you know it´s a known bug? I searched everywhere and could not find anything related…

I have a similar problem !
What’s the alternative ?

Because there is a thread on the matter already including the bug report number on the matter
But please don’t ask me where to find it, but I know I read it cause I posted there too that I struggled over the issue in beta (b3 or b4 the first time) but never could nail it down what exactly caused the crash as I had a whole application that was full of GUI basically and had to backport it to iphone 1.7 due to another bug at the time that prevented the project from meeting its dates on U3

But it basically never hurts to report it too

hm, mine is actually not crashing, it just doesn´t show the scrollview (and hammers errors into the log)

the log entry signalizes a crash (Exception means fatal error, if not handled, that gives you a exc_bad_access from iOS). if you build with fast + no exception it will die out there right away because you try to use a function not present if you use any stripping.

Hi marjan I don’t now but take a look of my thread : http://forum.unity3d.com/threads/62186-Unity-3-OnGUI-error
I have some problem with using Scroll to dipslay list of elements in Unity 3 ( which works like a charm in Unity 1.7 ) , I solve it by using “generic” type for array. It seams that Boo have problem with passing variant type to function arguments .

I don’t no much of details beyond the Unity, but you can free to go use my code sample.

itech:

Thanks, but that is a different issue. Actually i stumbled about that as well, cause for localized text i used an Arraylist with strings in a C Script, which i read out in a JS script. Worked in 1.7.
In 3.0 However, this resulted in the error message you describe. I also had to change the Arraylist to something else, in my case i used something like: public static string[ ] settingsStr_arr; settingsStr_arr = new string[4]; Doing so solved the issue.