GUIClip alternatives

I’m using a library written by someone else to handle forms and windows, but it uses GUIClip in several parts of the code. How can I substitute the undocumented GUIClip class with documented functions?

This is an example of the code I want to replace:

protected override void DrawControl()
        {
            GUIClip.Push(this.clientRect);
            DrawInnerControls();
            GUIClip.Pop();
        }

Thanks

Why? Is the code you have not working? If that’s the case, you should probably contact whoever you got it from for a fixed version :slight_smile:

There’s a reasonable chance that the the code you have uses undocumented functions to achieve something that cannot be done using only documented features of the API. In that case, the answer to your question would depend on what problems you’re encountering and/or what compromises you’re willing to make in the way the code works.

Off the top of my head, though, based on that one snippet of code without any other context, the only thing I could suggest would be to look at things like GUI.BeginArea() and other similar GUI functions that establish clipping regions.

Because it is internal in Unity 3.0 beta. I get this error in Unity 3.0 b6:

In the version history (__http://beta.unity3d.com/ethan/ReleaseNotes30.html__) they wrote:

•Made previously undocumented GUIClip class internal to UnityEditor.

Well that’s a pain in the cock.

1 Like

They sucked his brains out!

No, but seriously, explain what the function is trying to do, and I can help you find an alternative method.

mmm, it’s undocumented :frowning:

But I found this in this post (__http://forum.unity3d.com/viewtopic.php?p=194167__):

1 Like