FPSDisplayer by JungukHom - 2

Tools

Tool to display fps in Unity Engine.

Unknown LicenseUpdated 8 days agoCreated on April 5th, 2019

FPSDisplayer

Tool to display fps at GUI in Unity Engine.


Images




How to use

Setup

Download FPSDisplayer_v1.0 and import to your Unity project.


Create

public FpsDisplayer CreateDisplayer() 
{
    // FpsDisplayer displayer = FpsDisplayer.GetOrCreate();
    // FpsDisplayer displayer = FpsDisplayer.GetOrCreate(30);
    FpsDisplayer displayer = FpsDisplayer.GetOrCreate(75, DisplayPosition.UpperRight);
}

Get or Create(instantiate) FpsDisplayer.


public void GetOrCreate() {}
public void GetOrCreate(int fontSize) {}
public void GetOrCreate(int fontSize, DisplayPosition displayPosition) {}

Create() method is implemented like this.
Their default value is (fontSize : 30) and (displayPosition : DisplayerPosition.UpperLeft).


Modify

public void ModifyFpsDisplayer()
{
    FpsDisplayer fpsDisplayer = FpsDisplayer.GetOrCreate();
    fpsDisplayer.SetFontSize(50);
    fpsDisplayer.SetTextColor(Color.green);
    fpsDisplayer.SetDisplayPosition(DisplayPosition.MiddleCenter);
}

Modify instantiated or created FpsDisplayer’s text value.


Destroy

public void DestroyFpsDisplayer()
{
    FpsDisplayer.Destroy();
}

Destroy FpsDisplayer gameObject.

Show all projects by JungukHom