Log in or register to post comments

#define kFPS 60

December 21, 2012 - 4:21pm #4

when i try to put in the AppController.mm    inside the Copiler flag #define kFPS 60

the project failed, where is the rigth place to put #define kFPS 60?

It should be in

December 24, 2012 - 10:30am #3

It should be in AppController.mm as indicated by the comments below, taken from a sample file:


// kFPS define for removed

// you can use Application.targetFrameRate (30 fps by default)

However as I mentioned when you asked this question before ;)

... you are best off using Application.targetFrameRate = 60 within a Unity script which you can do within a Start() method of any script in the scene, possibly an empty GameObject.






i found this script and

December 25, 2012 - 5:36pm #2

i found this script and attach to the ARcamera. Its ok?  Seems to do not difference, on the performace.

is java.



using UnityEngine;

using System.Collections;


public class FPSScript : MonoBehaviour {

public float updateInterval = 0.5F;

private float lastInterval;

private int frames = 0;

private float fps;

void Start() {

lastInterval = Time.realtimeSinceStartup;

frames = 0;


Application.targetFrameRate = 60;



void OnGUI() {

GUILayout.Label("" + fps.ToString("f2"));


void Update() {


float timeNow = Time.realtimeSinceStartup;

if (timeNow > lastInterval + updateInterval) {

fps = frames / (timeNow - lastInterval);

frames = 0;

lastInterval = timeNow;





It is only a suggestion to

December 27, 2012 - 3:44am #1

It is only a suggestion to the Unity engine, so if possible it will try to attain the specified frame rate, if not then it will drop down to something more manageable.

If you want to try and experiment then you could try this with a non-AR scene and explore the findings that you get.



Log in or register to post comments