In this section, we have listed the issues you may encounter during your application’s development and ways you can work around them.
Canvas objects rendered black in Game view
Issue description:
While building your scene using Canvas, you may encounter the following issue: your objects render correctly in the Scene view, whereas in the Game view they are totally black. This is a known bug of the Unity Editor when using custom shaders on Screen Space - Overlay
Canvases objects.
Here are some threads on it:
- https://answers.unity.com/questions/1618238/ui-image-with-material-works-in-scene-mode-but-bla.html?childToView=1642248#comment-1642248
- https://answers.unity.com/questions/1220236/ui-image-dsiplayed-as-black-when-using-screen-spac.html
Workaround:
Set the Canvas’ Render Mode
to Screen Space - Camera
and reference the right Camera in the field Render Camera
, or set the Render Mode
to World Space
.
NeuroTags stimulation texture badly rendered on canvas
Issue description:
While building your scene using Canvas, you may encounter the following issue: your canvas objects using NextMind shaders are rendering the stimulation texture abnormally.
Workaround:
This is due to the shaders that aren’t properly handling the stimulation texture’s triplanar projection on default canvas. There are two ways to work around this issue :
- Set the
Projection
property of the object’s material toStandard
orScreen Coordinates
. - Add
Normal
to the CanvasAdditional Shader Channels
property.
Focus simulation & example scenes are not working while using Unity’s new Input System
Issue description:
While using Unity’s new input system, you may notice that Focus Simulation
is not working: even if the checkbox is checked on the NeuroManager, clicking on a NeuroTag will not allow you to interact with it.
The issue is also noticeable in SDK’s example scenes: you are not able to navigate through the steps.
Workaround:
The focus simulation is currently using Unity’s old input system by getting mouse clicks from Input.GetMouseButton
. If you need this feature, your only option is to set the Active Input Handling
to Both
in the player settings:
Regarding the issue happening within SDK’s example scenes, you have 2 options:
- Apply the
Both
value onActive Input Handling
in the player settings - Follow this guide to modify the scripts of the SDK (it will be done in further releases) and apply the update proposed by Unity on the EventsSystem’s
Standalone Input Module
of the Hub scene :
Computer is heating and its fan is running at full speed when entering play mode
Issue description:
When entering play mode inside a scene containing a NeuroManager, you may hear the fan turning at full speed until you press Stop. This is often due to the number of FPS reaching too high levels.
Workaround:
You can fix this in two different ways:
Application.targetFrameRate (https://docs.unity3d.com/ScriptReference/Application-targetFrameRate.html)
Use this property in the
Start
function of one your scene’s MonoBehaviours. You should set the lowest value that is acceptable for you. For example, if you choose a frame rate of 90fps, write it like this :Vertical Synchronisation (https://docs.unity3d.com/Manual/class-QualitySettings.html)
The vertical synchronisation can be set from Edit>Project Settings>Quality. In the Other section, you have to change the
VSync Count
property toEvery V Blank
orEvery Second V Blank
The VSync has to be enabled in the Game view as well:
Troubleshooting
In this section, we list common blocking situations users can face while developing an application with the NextMind SDK. Then we propose hints about what can cause the issue and how to resolve it.
DllNotFoundException message is displayed
Issue description:
When running the app, the message below is displayed:
Potential fixes:
This message is mostly displayed when an unsupported architecture is selected in the build settings. Make sure the right platform is selected (https://www.next-mind.com/product/specs/).
It may also be displayed if a SDK’s library is not present in your project. In this case, please download & import the SDK again in your project (at least the Plugins folder).
The NeuroTags are not activated
Issue description:
The NeuroTags in the scene remain inactive after pressing play. You notice at least one of these symptoms:
- NeuroTag’s gizmos remain red in the Scene view and not declared as Active in NextMind Profiler
- The stimulation is not happening (i.e. the stimulation texture is not switched on/off rapidly)
Potential fixes:
- NeuroManager:
- make sure a
NeuroManager
is present in your scene - make sure a Camera is set on the NeuroManager’s
Tracking Camera
property (The Camera tagged as Main Camera is used if this property is null). - make sure the NeuroManager is declared as
Ready
in the profiler, or by code usingNeuroManager.IsReady()
function.
- make sure a
- Visibility from the Tracking Camera:
- make sure the NeuroTags are inside the Tracking Camera’s FOV.
- make sure the object is on a layer visible to the camera (check Camera’s
Culling Mask
property)
- NeuroTag:
- make sure NeuroTag’
Stimulation renderers
property is properly set with renderers which should show the stimulation - make sure these renderers have a material using a NextMind shader (may not be needed if you are using a custom stimulation)
- make sure the
Stimulation update type
is set toDefault
if you do not intend on using a custom stimulation
- make sure NeuroTag’
The Simulate Focus property is malfunctioning
Issue description:
When clicking on NeuroTags in Play Mode, nothing happens.
Potential fixes:
- Usage:
- make sure to hold the mouse button while simulating the focus. NeuroTag’s confidence value is not set to 1 directly. It will be smoothly interpolated from the current confidence value to 1.
- NeuroManager:
- make sure the
Simulate Focus
is checked
- make sure the
- NeuroTag:
- make sure the NeuroTag is active (if not, consult dedicated troubleshooting section)
- make sure the Stimulation renderer targeted by the NeuroTag has:
- if it is a Canvas object,
Raycast Target
property checked, and the Canvas has aGraphic Raycaster
component - else a
Collider
orCollider2D
- if it is a Canvas object,