![]() |
Advanced FPS Counter
1.5.4
FPS Counter on steroids!
|
Inherits MonoBehaviour.
Static Public Member Functions | |
static AFPSCounter | AddToScene () |
static AFPSCounter | AddToScene (bool keepAlive) |
static void | SelfDestroy () |
Public Attributes | |
FPSCounterData | fpsCounter = new FPSCounterData() |
MemoryCounterData | memoryCounter = new MemoryCounterData() |
DeviceInfoCounterData | deviceInfoCounter = new DeviceInfoCounterData() |
KeyCode | hotKey = KeyCode.BackQuote |
bool | circleGesture |
bool | hotKeyCtrl |
bool | hotKeyShift |
bool | hotKeyAlt |
Properties | |
bool | KeepAlive [get] |
OperationMode | OperationMode [get, set] |
bool | ForceFrameRate [get, set] |
int | ForcedFrameRate [get, set] |
bool | Background [get, set] |
Color | BackgroundColor [get, set] |
int | BackgroundPadding [get, set] |
bool | Shadow [get, set] |
Color | ShadowColor [get, set] |
Vector2 | ShadowDistance [get, set] |
bool | Outline [get, set] |
Color | OutlineColor [get, set] |
Vector2 | OutlineDistance [get, set] |
bool? | AutoScale [get, set] |
float | ScaleFactor [get, set] |
Font | LabelsFont [get, set] |
int | FontSize [get, set] |
float | LineSpacing [get, set] |
int | CountersSpacing [get, set] |
Vector2 | PaddingOffset [get, set] |
bool | PixelPerfect [get, set] |
int | SortingOrder [get, set] |
static AFPSCounter | Instance [get] |
Allows to see frames per second counter, memory usage counter and some simple hardware information right in running app on any device.
Just call AFPSCounter.AddToScene() to use it.
You also may add it to GameObject (without any child or parent objects, with zero rotation, zero position and 1,1,1 scale) as usual or through the
"GameObject > Create Other > Code Stage > Advanced FPS Counter" menu.
|
inlinestatic |
Creates and adds new AFPSCounter instance to the scene if it doesn't exists with keepAlive set to true. Use it to instantiate AFPSCounter from code before using AFPSCounter.Instance.
|
inlinestatic |
Creates and adds new AFPSCounter instance to the scene if it doesn't exists. Use it to instantiate AFPSCounter from code before using AFPSCounter.Instance.
keepAlive | Set true to prevent AFPSCounter's Game Object from destroying on level (scene) load. Applies to the new Instance only. |
|
inlinestatic |
Use it to completely dispose current AFPSCounter instance.
FPSCounterData fpsCounter = new FPSCounterData() |
Frames Per Second counter.
MemoryCounterData memoryCounter = new MemoryCounterData() |
Mono or heap memory counter.
DeviceInfoCounterData deviceInfoCounter = new DeviceInfoCounterData() |
Device hardware info.
Shows CPU name, cores (threads) count, GPU name, total VRAM, total RAM, screen DPI and screen size.
KeyCode hotKey = KeyCode.BackQuote |
Used to enable / disable plugin at runtime. Set to KeyCode.None to disable.
bool circleGesture |
Used to enable / disable plugin at runtime. Make two circle gestures with your finger \ mouse to switch plugin on and off.
bool hotKeyCtrl |
Hot key modifier: any Control on Windows or any Command on Mac.
bool hotKeyShift |
Hot key modifier: any Shift.
bool hotKeyAlt |
Hot key modifier: any Alt.
|
get |
Read-only property allowing to figure out current keepAlive state.
|
getset |
Use it to change AFPSCounter operation mode.
Disabled: removes labels and stops all internal processes except Hot Key listener.
Background: removes labels keeping counters alive. May be useful for hidden performance monitoring and benchmarking. Hot Key has no effect in this mode.
Normal: shows labels and runs all internal processes as usual.
|
getset |
Allows to see how your game performs on specified frame rate.
IMPORTANT: this option disables VSync while enabled!
Useful to check how physics performs on slow devices for example.
|
getset |
Desired frame rate for ForceFrameRate option, does not guarantee selected frame rate. Set to -1 to render as fast as possible in current conditions.
|
getset |
Background for all texts.
|
getset |
Color of the background.
|
getset |
Padding of the background. Change forces the HorizontalLayoutGroup.SetLayoutHorizontal() call.
|
getset |
Shadow effect for all texts.
|
getset |
Color of the shadow effect.
|
getset |
Distance of the shadow effect.
|
getset |
Outline effect for all texts.
|
getset |
Color of the outline effect.
|
getset |
Distance of the outline effect.
|
getset |
Controls own Canvas Scaler scale mode. Check to use ScaleWithScreenSize. Otherwise ConstantPixelSize will be used.
|
getset |
Controls global scale of all texts.
|
getset |
Font to render labels with.
|
getset |
The font size to use (for dynamic fonts).
If this is set to a non-zero value, the font size specified in the font importer is overridden with a custom size. This is only supported for fonts set to use dynamic font rendering. Other fonts will always use the default font size.
|
getset |
Space between lines.
|
getset |
Lines count between different counters in a single label.
|
getset |
Pixel offset for anchored labels. Automatically applied to all labels.
|
getset |
Controls own canvas Pixel Perfect property.
|
getset |
Sorting order to use for the canvas.
Set higher value to get closer to the user.
|
staticget |
Allows reaching public properties from code. Can be null.