Use the plug-in without the Spatial Reality Display attached
You can use the plugin without a Spatial Reality Display attached.
Prerequisites
- Setup your Spatial Reality Display, if not, see: Setup Spatial Reality Display,Setup Spatial Reality Display Settings
- Set up your Unity project installed SRDisplay UnityPlugin, if not, see: Setup for Unity
To use without an Spatial Reality Display attached
- Check Run Without Spatial Reality Display in Edit > ProjectSettings.. > Spatial Reality Display

This activates the RunWithout mode. In the mode, you can check your app in the normal Game tab and navigate with your mouse(right-click drag and wheel).
If you see the Display 1 No cameras rendering warning,

you can remove it by right-clicking on Game tab and checking on the toggle button.
Camera is not rendering
making the scene of my game I tried to put a hotspot using the tutorial on youtube, but once it was put, the camera stopped working. The message that I have is: Display 1 No cameras rendering.

I then removed the hotspot and all related with it (the actions and the hotspot walk to) but the problem persists.
Any idea about what is happening?
Thank you very much!!
If I click in the scene I get these errors:
NullReferenceException: Object reference not set to an instance of an object
AC.PlayerInteraction.IsMouseOverHotspot () (at Assets/AdventureCreator/Scripts/Controls/PlayerInteraction.cs:1192)
AC.PlayerMovement.UpdatePlayerMovement () (at Assets/AdventureCreator/Scripts/Controls/PlayerMovement.cs:101)
AC.StateHandler.Update () (at Assets/AdventureCreator/Scripts/Game engine/StateHandler.cs:321)
NullReferenceException: Object reference not set to an instance of an object
AC.PlayerInput.Grab () (at Assets/AdventureCreator/Scripts/Controls/PlayerInput.cs:1730)
AC.PlayerInput.UpdateDrag () (at Assets/AdventureCreator/Scripts/Controls/PlayerInput.cs:1674)
AC.PlayerInput.UpdateInput () (at Assets/AdventureCreator/Scripts/Controls/PlayerInput.cs:591)
AC.StateHandler.Update () (at Assets/AdventureCreator/Scripts/Game engine/StateHandler.cs:240)
But I don’t have any hotspot or item to grab on it.
Comments
Ummm. you are not showing your other cameras in the hierarchy so it’s hard to tell. There should be the main camera, plus at least one more camera which the main camera will follow. But in the scene it doesn’t appear like you have anything else but the main camera. Have you tried to create a default camera from the Scene manager?
September 2016 edited September 2016
I tried yes, but I have to say that having only one camera, the game was working properly until I put the hotspot. I could see everything. However I’ll try creating another one and making the main camera follow this one.
Why do I need more than one camera?
—— I’ve tried creating another camera, making this one child of the main camera, using only the new camera, and it doesn’t work.
—— Also I deleted all the cameras I had and created another one from scratch and I get the same message.
Of course thank you for the reply!
No, no, you just go into the AC editor and click the scene manager tab. There you can create cameras that will work with AC (regular cameras aren’t going to cut it unless you put the components yourself, so best use the AC editor to create more). Also you’ll need to define a default camera. If there isn’t one already defined you can hit the create button which appears right next to the slot. There’s no need to child any object. The AC main camera follows AC cameras by itself.
Anyways, make sure that your main camera is not disabled and that it actually has the AC Main Camera component. It may be that you main camera got disable for some reason.
September 2016 edited September 2016
Aha! Just to make sure, I went to my scene and deleted the main camera and I get the same error (which is sort of obvious though. all other AC cameras have their unity camera component disabled, because as I mentioned the main camera just uses them at runtime as a point of reference).
So either you deleted the orignal AC MainCamera, have disabled it (-there’s a checkbox near the top which need to be ticked, if it’s not then it’s disabled), or deleted the AC MainCamera component somehow. Usually the maincamera is created for you when you organize the room objects. If you deleted the component or the original maincamera just turn a regular camera into one, scroll down in the inspector then hit Add component at the button and type Main Camera then click the component name in the list that appears. Else, as I mentioned it may be it just got disabled somehow.
September 2016 edited September 2016
It doesn’t work. I have the camera active, put it as a default camera and the playerStart2D has the camera too. but doesn’t render.
I have created another camera, I did the same configuration, but doesn’t work.
Here you have captures:
The camera.

Now I have a new error that says:
NullReferenceException: Object reference not set to an instance of an object
AC.MultiSceneChecker.Awake () (at Assets/AdventureCreator/Scripts/Game engine/MultiSceneChecker.cs:29)
And now I can’t see the mouse or click in the menu or anything. Is going worst.
September 2016 edited September 2016
Finally my camera renders, the new camera I’ve created didn’t have checked the camera in the inspector. Otherwise now I can’t click in the scene or the player appears. It is related with the error bellow. I’ll try to see if I can hunt it..
—- Ok if I put the script Main Camera to the camera, the message «Display 1 no cameras renedering» appears but in the MultiSceneChecker.cs the camera is not null. if I delete the component the camera renders. but in the MultiS. the camera is null. It starts to be funny! 🙂
—- OMG! Ok, I think here is the «real» problem. When I press the start button, unity turn off all the cameras I have. I don’t know why.

If I click on it then starts render.
I can’t edit the previous message. the new question is: Why is unity disabling the cameras? Any idea to avoid that?
THANK YOU again Alverik!
September 2016 edited September 2016
Hi! Anyway, as far as I know, only the camera which has the Main Camera script should have the unity camera component enabled, all others should be disabled (mind you, I mean the Unity camera script the same component you showed in your last image — the mall one, not the AC camera script, those should be enabled in all cameras). The AC Main Camera should take care of the rest. The error may have to do with the fact that the Main Camera is not there when AC tries to find it (probably because it’s disabled). The other cameras are probably getting disabled by AC (it may be trying to make sure only the main camera is enabled).
If by chance there’s a problem with your main camera you may want to open a new scene, convert it to an AC scene, then take the main camera it creates for you (just prefab it), close that scene, go back to your normal scene, then drop the prefabed main camera into your hierarchy into the cameras folder (if you do this just make sure to delete the old main camera you had before).
Ah, by the way the AC forums only lets you edit your post for an hour after posting it, after that the posts get locked.
September 2016 edited September 2016
Welcome to the forum, @LUXO99 — I apologise you’re having some problems this early on with AC.
First of all, be sure that you are using the very latest version of AC (v1.53d). The console errors and screenshots you’ve provided suggest it’s an old version of AC, so in order for us to understand them we’ll need to see them when used with the latest AC.
As @Alverik correctly states, the various GameCameras you have are being disabled by AC. They are used purely as «reference points» for the MainCamera — which should be the only one actually rendering anything. You can read more about the way the camera system works in Section 4.1 of the included Manual.
The MainCamera not rendering issue has been reported before — and I’m keen to address it. However, so far as I can tell, it does appear to be an issue with Unity 5.4 — can you let us know the exact version of Unity you’re using, and on what platform?
If the MainCamera’s own Camera component is enabled when the game runs (which it should be), then Unity should render it in the Game window — if not, that to me sounds like a problem with Unity. You should try updating to a Unity patch release. It’s also worth seeing if either of the included demo games run OK.
Updating to the latest AC may remove your Console errors — but if they don’t, please post the new error messages here (they’ll be slightly different due to the line numbers) and we’ll be able to help you more thoroughly.
Unity3D: обновление Camera.targetTexture приводит к краху редактора
Привет всем!
В игре основная камера рендерит сцену в Camera.targetTexture.
При смене разрешения экрана, я меняю разрешение текстур:
1) создаю новые текстуры
2) переназначаю камере новые текстуры
3) старые текстуры удаляю
На шаге 2 редактор unity ломается. Ломается на строчке: camera.targetTexture = fonTexture;
Как выглядят шаги:
0) RenderTexture oldTex = fonTexture; (сохраняю ссылку на старую текстуру)
1) fonTexture = new RenderTexture (width, height, 24, GetPreferred_ARGB_RenderTextureFormat());
fonTexture.name = «_BlurredLightTexture»;
fonTexture.useDynamicScale = true;
fonTexture.filterMode = FilterMode.Bilinear;
fonTexture.Create ();
2) camera.targetTexture = fonTexture; // редактор вылетает
3) RenderTexture.active = null;
if (oldTex) <
oldTex.Release ();
DestroyImmediate ( oldTex );
>
Если я делаю camera.targetTexture = fonTexture; в следующем фрейме (например в корутине, то все работает нормально).
В чем может быть проблема? Может нужно создавать текстуру как-то особенно, типа fonTexture.ForceCreate(); .
#1
0:09, 5 апр 2020
Alerr
Мне почему-то кажется что новую текстуру с новым размером создавать не надо. Это все должно делается внутри уже установленной текстуры. Я когда делал RenderTexture то создавал ее как Asset. И насколько я помню размер она выбирает под экран камеры.
Ну или если я ошибаюсь просто width и height поменять.
Alerr
> в следующем фрейме
Может нужен OnPreRender.
#2
0:40, 5 апр 2020
foxes
> Мне почему-то кажется что новую текстуру с новым размером создавать не надо. Это все должно делается внутри уже установленной текстуры.
Да нет, как же. Когда создаешь текстуру, никак не обойтись без указания размера. От размера же зависит выделяемая память.
> И насколько я помню размер она выбирает под экран камеры.
Нет, не выбирает. Вы про RenderTexture?
> Ну или если я ошибаюсь просто width и height поменять.
Спасибо, попробую.
> Может нужен OnPreRender.
Да фиг его знает, я не пойму с чего юнити-то падает из-за смены renderTarget камеры. Может текстура создается не в этом же фрейме
#3
0:46, 5 апр 2020
Судя по
Alerr
> RenderTexture.active = null;
ты это делаешь прямо во время отрисовки что ли? Не надо так. Это можно делать в апдейте.
У меня сделано так:
using UnityEngine; [RequireComponent(typeof(Camera))] public class TextureCamera: MonoBehaviour < public event System.ActiononTextureUpdated = delegate < >; public Camera getCamera() < return _camera; >public RenderTexture getTexture() < return _texture; >[SerializeField] private int _textureDepth = 24; private Camera _camera; private RenderTexture _texture; void Start() < _camera = GetComponent(); int resWidth = Screen.width; int resHeight = Screen.height; createTexture(resWidth, resHeight); > void OnDestroy() < releaseTexture(); >void Update() < if (_texture.width != Screen.width || _texture.height != Screen.height) < releaseTexture(); createTexture(Screen.width, Screen.height); >> private void createTexture(int width, int height) < _texture = new RenderTexture(width, height, _textureDepth); _texture.Create(); _camera.targetTexture = _texture; onTextureUpdated(_texture); >private void releaseTexture() < _camera.targetTexture = null; _texture.Release(); _texture = null; >>
#4
1:04, 5 апр 2020
pahah
> ты это делаешь прямо во время отрисовки что ли? Не надо так. Это можно делать в апдейте.
Кстати, да, спасибо 🙂
#5
1:17, 5 апр 2020
Alerr
> Нет, не выбирает. Вы про RenderTexture?
Ах да, я забыл что размеры текстуры и будут являться в данном случае размером экрана.
В RenderTexture и камере есть параметры useDynamicScale, allowDynamicResolution .
useDynamicScale Is the render texture marked to be scaled by the Dynamic Resolution system.
allowDynamicResolution True if the camera is using Dynamic Resolution rendering and false if it is not. Even if this property is true, Dynamic Resolution is only used if also supported by the current Graphics Device.
Возможно это поможет.
Вообще сам объект нет смысла пересоздавать.
renderTexture.Release(); renderTexture.width = Screen.width; renderTexture.height = Screen.height; renderTexture.Create();
#6
1:48, 5 апр 2020
foxes
> Возможно это поможет.
Да, все помогло, спасибо!
How to solve «No cameras rendering» in Unity?

I am entirely new to Unity. I have a task to work with a tool in Unity. I’m not sure the «Game» is where I should work or the «Scene»? this is how my «Game» tab looks like, but I saw animations in the «Scene» tab. for changing parameters of animation, I should come back to the «Game» tab to change and again go to the «Scene» tab to see the result. I think something is wrong, and I should see the animation in the «Game» tab. Am I right? It was confusing for me to explain my problem cause I have no idea!
- unity-game-engine
- unity-container
- game-engine
- game-development
Zahra Hosseini
asked Jan 17, 2022 at 0:15
Zahra Hosseini Zahra Hosseini
504 2 2 gold badges 4 4 silver badges 16 16 bronze badges
Post a screenshot of hierarchy may helps us to clarify the problem
Jan 17, 2022 at 3:44
Add a Camera to your scene?
Jan 17, 2022 at 3:53
4 Answers 4
It’s very confusing what is happening in your Unity scene. I assume either you have a disabled camera object or no camera at all.
Search the hierarchy for a MainCamera object and enable it. The game view is rendered from cameras in the application. If you cannot find a camera gameobject, try adding a camera (Gameobject>Camera). If you could find a camera gameobject, you should also check it’s Camera component has target display set to Display 1.
answered Jan 17, 2022 at 2:47
Dean Overton Dean Overton
76 2 2 bronze badges
In the Scene View at the top left, you can click 2D View. Then you can select the canvas in the hierarchy and press «F», while your mouse is over the scene view, to focus it there. In the end, you should be able to see the canvas in the scene view just as you can in the game view.
In fact, you don’t need a camera in the scene to render UI elements, which is quite confusing. So if you don’t need to solve the «no camera rendering» problem, as long as there are no 3D objects you want to draw. Keep in mind that you will probably need to manually place an audio listener if you want to hear something at some point.