Editor Mode Development Guide
LCC Unity SDK supports rendering scenes in the Editor, meaning the LCC model can be translated, rotated, and scaled in edit mode like any other GameObject in Unity. You can view and adjust the 3DGS scene in the Scene window in real time without clicking the Play button to enter Play mode.
When using the Samples scene, you can complete scene rendering through non-code operations; when using custom scripts, you can achieve the same effect through code operations.
Note:
LCC Unity SDK supports both full and chunked rendering modes. In full rendering mode, the Scene view can render the entire model completely; in chunked rendering mode, because the positions and orientations of the Scene Camera and Game Camera are not consistent, the model may not be fully displayed in the Scene window. In this case, you need to synchronize the Scene Camera and the Game Camera.
Non-code Operations
When using the SDK Samples scene, if the data file path (File Path) is filled in correctly, Unity will automatically render the scene in the Editor after startup, as shown below.

After filling in File Path correctly, Unity renders the scene automatically in the Editor on startup
Switch Scene
When you need to modify the rendered scene, follow these steps:
- Select the LCCRenderer GameObject in the Hierarchy window.
- Fill in the new scene's data path correctly in File Path in the Inspector window.
- Click the three dots (⋮) to the right of the LCCRenderer (Script) component, and choose Render from the pop-up menu, as shown below.

Click Render in the three-dot menu to the right of the LCCRenderer (Script) component
Note:
Because unloading the original scene data and loading new scene data takes some time, please wait a moment after clicking Render; the new scene will finish loading.
Stop Scene Rendering
When you no longer need to render the scene in the Editor, follow these steps to stop rendering:
- Select the LCCRenderer GameObject in the Hierarchy window.
- Fill in the data path correctly in File Path in the Inspector window.
- Click the three dots (⋮) to the right of the LCCRenderer (Script) component, and choose unRender from the pop-up menu, as shown below. This stops the current scene rendering.

Click unRender in the three-dot menu to the right of the LCCRenderer (Script) component
Enter Play Mode
When you click the Play button in Unity to enter normal Play mode, the scene will re-render in the runtime state. Because the SDK uses a multithreading mechanism internally, entering Play mode forcibly exits the rendering thread in edit mode, which shows as an error message printed in the Console.
You can completely ignore this error; it has no adverse effect and does not affect subsequent normal operation.
If you really do not want to see this error, you can perform the Stop Scene Rendering (unRender) step above before clicking the Play button, then click the Play button to enter the runtime state.
Code Operations
If you use a custom script to render the scene, just add the [ExecuteInEditMode] attribute before your custom rendering class to make the script run in the Editor, thereby rendering the scene in edit mode. For other operation logic, refer to the LCCRenderer.cs script in Samples.
using LCCCore;
using UnityEngine;
[ExecuteInEditMode]
public class MyLCCRenderer : MonoBehaviour
{
public LCCManager m_manager;
public string m_FilePath;
private LCCCore.Renderer m_renderer;
void Start()
{
m_manager.SetPlatformType(PlatformType.PC);
m_manager.SwitchRenderPass(ActiveRenderMode.SingleRender);
// Enable editor mode
m_manager.SetEditorMode(true);
m_renderer = m_manager.GetRender(this.transform);
m_renderer.Load(m_FilePath, onProgress, onComplete);
}
private void onProgress(float _progress)
{
Debug.Log($"[MyLCCRenderer] file load progress: {_progress:P1}");
}
private void onComplete()
{
Debug.Log($"[MyLCCRenderer] file loaded");
}
}
Note:
- The
[ExecuteInEditMode]attribute causes lifecycle methods such asStartandUpdateto be called in the Editor even outside Play mode; this is the key to Editor mode rendering.- Editor mode is supported only on PC/Mac platforms.
- For the complete rendering workflow (platform setup, render mode, data loading), refer to the
LCCRenderer.csscript in Samples.
Synchronize Cameras Between the Scene and Game Windows
The Samples provided by the SDK include the SceneGameCameraSync script, which syncs the camera operations of the Scene window to the Game window, letting you operate the view in the Editor while previewing the runtime image. Usage steps:
- Attach the
SceneGameCameraSyncscript from Samples to the camera (Camera) GameObject in the scene. - Disable the camera operation script (by default
CameraOperate). - Click the Play button to enter Play mode.
At this point, operating the camera in the Scene window will sync the camera in the Game window accordingly.

Attach the SceneGameCameraSync script to the camera object and disable the CameraOperate script
Note:
Camera synchronization only supports syncing the camera from the Scene window to the Game window; it does not support syncing camera operations from the Game window to the Scene window.