Repository: playcanvas/engine
File: src/framework/components/gsplat/component.js (JavaScript)

Code before:
            }
            mi.castShadow = this._castShadows;
            mi.setCustomAabb(this._customAabb);

            if (this.enabled && this.entity.enabled) {
                this.addToLayers();
            }
        }
    }

    /**
     * Gets the {@link GSplatInstance} on the component.
     *
     * @type {GSplatInstance|null}
     * @ignore
     */
    get instance() {
        return this._instance;
    }

    /**
     * Sets the material used to render the gsplat.
     *
     * **Note:** This setter is only supported when `unified is false`. When it's true, multiple
     * gsplat components share a single material per camera/layer combination.To access materials in
     * unified mode, use `app.systems.gsplat.getGSplatMaterial(camera, layer)`.
     *
     * @param {ShaderMaterial} value - The material instance.
     */
    set material(value) {
        if (this.unified) {
            Debug.warn('GSplatComponent#material setter is not supported when unified true. Use app.systems.gsplat.getGSplatMaterial(camera, layer) to access materials.');
            return;
        }
        if (this._instance) {
            this._instance.material = value;
        } else {
            this._materialTmp = value;
        }
    }

    /**
     * Gets the material used to render the gsplat.
     *
     * **Note:** This getter returns `null` when `unified is true`. In unified mode, materials are
     * organized per camera/layer combination rather than per component. To access materials in
     * unified mode, use `app.systems.gsplat.getGSplatMaterial(camera, layer)`.
     *
     * @type {ShaderMaterial|null}
     */
    get material() {

Review comment (suggestion):
```suggestion
     * **Note:** This setter is only supported when {@link unified} is `false`. When it's true, multiple
     * gsplat components share a single material per camera/layer combination. To access materials in
     * unified mode, use {@link GsplatComponentSystem#getGSplatMaterial}.
```

Code after:
            }
            mi.castShadow = this._castShadows;
            mi.setCustomAabb(this._customAabb);

            if (this.enabled && this.entity.enabled) {
                this.addToLayers();
            }
        }
    }

    /**
     * Gets the {@link GSplatInstance} on the component.
     *
     * @type {GSplatInstance|null}
     * @ignore
     */
    get instance() {
        return this._instance;
    }

    /**
     * Sets the material used to render the gsplat.
     *
     * **Note:** This setter is only supported when {@link unified} is `false`. When it's true, multiple
     * gsplat components share a single material per camera/layer combination. To access materials in
     * unified mode, use {@link GsplatComponentSystem#getGSplatMaterial}.
     *
     * @param {ShaderMaterial} value - The material instance.
     */
    set material(value) {
        if (this.unified) {
            Debug.warn('GSplatComponent#material setter is not supported when unified true. Use app.systems.gsplat.getGSplatMaterial(camera, layer) to access materials.');
            return;
        }
        if (this._instance) {
            this._instance.material = value;
        } else {
            this._materialTmp = value;
        }
    }

    /**
     * Gets the material used to render the gsplat.
     *
     * **Note:** This getter returns `null` when {@link unified} is `true`. In unified mode, materials are
     * organized per camera/layer combination rather than per component. To access materials in
     * unified mode, use {@link GsplatComponentSystem#getGSplatMaterial}.
     *
     * @type {ShaderMaterial|null}
     */
    get material() {