Problem in Plugin

Assassin

Plugin Developer
Plugin Developer
Apr 9, 2017
190
195
43
25
Iran
Hi
this is that code that i have:

C#:
  //btn fps+
            if (GUI.Button(new Rect(3, 3, 113, 18), "FPS+", buttonStyle))
            {
                if (!loadDefault)
                {
                    heightmapPixelError = Terrain.activeTerrain.heightmapPixelError;
                    detailObjectDistance = Terrain.activeTerrain.detailObjectDistance;
                    treeDistance = Terrain.activeTerrain.treeDistance;
                    treeMaximumFullLODCount = Terrain.activeTerrain.treeMaximumFullLODCount;
                    loadDefault = true;
                }

                if (fpsBoostActive)
                {
                    Terrain.activeTerrain.heightmapPixelError = heightmapPixelError;
                    Terrain.activeTerrain.detailObjectDistance = detailObjectDistance;
                    Terrain.activeTerrain.treeDistance = treeDistance;
                    Terrain.activeTerrain.treeMaximumFullLODCount = treeMaximumFullLODCount;
                    fpsBoostActive = false;
                }
                else
                {
                    Terrain.activeTerrain.heightmapPixelError = 110;
                    Terrain.activeTerrain.detailObjectDistance = 0;
                    Terrain.activeTerrain.treeDistance = 225;
                    Terrain.activeTerrain.treeMaximumFullLODCount = 0;
                    fpsBoostActive = true;
                }
            }
but i don't know what refrences are needed for this Plugin!
i only know GUI is for Unity! But Terrain and Rect ?
 

Jakkee

Plugin Developer
Plugin Developer
Contributor
Jul 28, 2014
1,465
925
113
Australia
You're going to need a little more code than that, Reference;
RB
UnityEngine
Assembly Csharp
 
  • Like
Reactions: Assassin

Jakkee

Plugin Developer
Plugin Developer
Contributor
Jul 28, 2014
1,465
925
113
Australia
You're going to need

using blah1;
using blah2;

Class something something
{
private bool fpsBoostActive = false;
private bool loadDefault = true;

//Rest of code
}

And probably some code to show the GUI on the players screen
 

Assassin

Plugin Developer
Plugin Developer
Apr 9, 2017
190
195
43
25
Iran
You're going to need

using blah1;
using blah2;

Class something something
{
private bool fpsBoostActive = false;
private bool loadDefault = true;

//Rest of code
}

And probably some code to show the GUI on the players screen
thank you <3