Hi all. I am getting an error when try to get properties of scene in Inspector.
I just choose scene and click on scene node, and getting this errors in console:
Also you can see inspector is empty.

Hi all. I am getting an error when try to get properties of scene in Inspector.
I just choose scene and click on scene node, and getting this errors in console:
Also you can see inspector is empty.

send me the scene file and prefab files~
Here is my main.secene
[
{
"__type__": "cc.SceneAsset",
"_name": "",
"_objFlags": 0,
"_native": "",
"scene": {
"__id__": 1
}
},
{
"__type__": "cc.Scene",
"_name": "main",
"_objFlags": 0,
"_parent": null,
"_children": [
{
"__id__": 2
},
{
"__id__": 5
},
{
"__id__": 7
}
],
"_active": true,
"_components": [],
"_prefab": null,
"autoReleaseAssets": false,
"_globals": {
"__id__": 23
},
"_id": "21501f17-b7c1-421a-adec-94dce1b35860"
},
{
"__type__": "cc.Node",
"_name": "Main Light",
"_objFlags": 0,
"_parent": {
"__id__": 1
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 3
}
],
"_prefab": null,
"_lpos": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_lrot": {
"__type__": "cc.Quat",
"x": -0.24999999999999997,
"y": -0.24999999999999997,
"z": -0.06698729810778066,
"w": 0.9330127018922194
},
"_lscale": {
"__type__": "cc.Vec3",
"x": 1,
"y": 1,
"z": 1
},
"_layer": 1073741824,
"_euler": {
"__type__": "cc.Vec3",
"x": -30,
"y": -30,
"z": 0
},
"_id": "c0y6F5f+pAvI805TdmxIjx"
},
{
"__type__": "cc.DirectionalLight",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 2
},
"_enabled": true,
"__prefab": null,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_useColorTemperature": false,
"_colorTemperature": 6550,
"_staticSettings": {
"__id__": 4
},
"_illuminance": 65000,
"_id": "597uMYCbhEtJQc0ffJlcgA"
},
{
"__type__": "cc.StaticLightSettings",
"_baked": false,
"_editorOnly": false,
"_bakeable": false,
"_castShadow": false
},
{
"__type__": "cc.Node",
"_name": "Main Camera",
"_objFlags": 0,
"_parent": {
"__id__": 1
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 6
}
],
"_prefab": null,
"_lpos": {
"__type__": "cc.Vec3",
"x": -10,
"y": 10,
"z": 10
},
"_lrot": {
"__type__": "cc.Quat",
"x": -0.27781593346944056,
"y": -0.36497167621709875,
"z": -0.11507512748638377,
"w": 0.8811195706053617
},
"_lscale": {
"__type__": "cc.Vec3",
"x": 1,
"y": 1,
"z": 1
},
"_layer": 1073741824,
"_euler": {
"__type__": "cc.Vec3",
"x": -35,
"y": -45,
"z": 0
},
"_id": "c9DMICJLFO5IeO07EPon7U"
},
{
"__type__": "cc.Camera",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 5
},
"_enabled": true,
"__prefab": null,
"_projection": 1,
"_priority": 0,
"_fov": 45,
"_fovAxis": 0,
"_orthoHeight": 10,
"_near": 1,
"_far": 1000,
"_color": {
"__type__": "cc.Color",
"r": 51,
"g": 51,
"b": 51,
"a": 255
},
"_depth": 1,
"_stencil": 0,
"_clearFlags": 7,
"_rect": {
"__type__": "cc.Rect",
"x": 0,
"y": 0,
"width": 1,
"height": 1
},
"_aperture": 19,
"_shutter": 7,
"_iso": 0,
"_screenScale": 1,
"_visibility": 1822425087,
"_targetTexture": null,
"_id": "7dWQTpwS5LrIHnc1zAPUtf"
},
{
"__type__": "cc.Node",
"_name": "Canvas",
"_objFlags": 0,
"_parent": {
"__id__": 1
},
"_children": [
{
"__id__": 8
},
{
"__id__": 10
}
],
"_active": true,
"_components": [
{
"__id__": 17
},
{
"__id__": 19
},
{
"__id__": 21
}
],
"_prefab": null,
"_lpos": {
"__type__": "cc.Vec3",
"x": 320,
"y": 480,
"z": 0
},
"_lrot": {
"__type__": "cc.Quat",
"x": 0,
"y": 0,
"z": 0,
"w": 1
},
"_lscale": {
"__type__": "cc.Vec3",
"x": 1,
"y": 1,
"z": 1
},
"_layer": 33554432,
"_euler": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_id": "ae4q0J7vVKBYDRtZHONY1K"
},
{
"__type__": "cc.Node",
"_name": "Camera",
"_objFlags": 0,
"_parent": {
"__id__": 7
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 9
}
],
"_prefab": null,
"_lpos": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 1000
},
"_lrot": {
"__type__": "cc.Quat",
"x": 0,
"y": 0,
"z": 0,
"w": 1
},
"_lscale": {
"__type__": "cc.Vec3",
"x": 1,
"y": 1,
"z": 1
},
"_layer": 1073741824,
"_euler": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_id": "3cDqoovORCoJ83Uwq1B+vL"
},
{
"__type__": "cc.Camera",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 8
},
"_enabled": true,
"__prefab": null,
"_projection": 0,
"_priority": 1073741824,
"_fov": 600,
"_fovAxis": 0,
"_orthoHeight": 480,
"_near": 1,
"_far": 2000,
"_color": {
"__type__": "cc.Color",
"r": 0,
"g": 0,
"b": 0,
"a": 255
},
"_depth": 1,
"_stencil": 0,
"_clearFlags": 6,
"_rect": {
"__type__": "cc.Rect",
"x": 0,
"y": 0,
"width": 1,
"height": 1
},
"_aperture": 19,
"_shutter": 7,
"_iso": 0,
"_screenScale": 1,
"_visibility": 41943040,
"_targetTexture": null,
"_id": "e1YXNuJxpDLJePi/D5kGK9"
},
{
"__type__": "cc.Node",
"_objFlags": 0,
"_parent": {
"__id__": 7
},
"_prefab": {
"__id__": 11
},
"_id": "2aPGCWPANGf44Rcva3Kd9A"
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 10
},
"asset": {
"__uuid__": "aaf2cc2c-a5fd-4eed-adb5-fcbefef31b98",
"__expectedType__": "cc.Prefab"
},
"fileId": "c4CBZWcGVM0bL7x9nPnmvO",
"instance": {
"__id__": 12
}
},
{
"__type__": "cc.PrefabInstance",
"fileId": "a9iEPM5hdP85Vc7jMVrJ0f",
"mountedChildren": [],
"mountedComponents": [],
"propertyOverrides": [
{
"__id__": 13
},
{
"__id__": 15
},
{
"__id__": 16
}
],
"removedComponents": []
},
{
"__type__": "CCPropertyOverrideInfo",
"targetInfo": {
"__id__": 14
},
"propertyPath": [
"_name"
],
"value": "Block"
},
{
"__type__": "cc.TargetInfo",
"localID": [
"c4CBZWcGVM0bL7x9nPnmvO"
]
},
{
"__type__": "CCPropertyOverrideInfo",
"targetInfo": {
"__id__": 14
},
"propertyPath": [
"_lpos"
],
"value": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
}
},
{
"__type__": "CCPropertyOverrideInfo",
"targetInfo": {
"__id__": 14
},
"propertyPath": [
"_lrot"
],
"value": {
"__type__": "cc.Quat",
"x": 0,
"y": 0,
"z": 0,
"w": 1
}
},
{
"__type__": "cc.UITransform",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 7
},
"_enabled": true,
"__prefab": {
"__id__": 18
},
"_contentSize": {
"__type__": "cc.Size",
"width": 640,
"height": 960
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_id": "b6L/0BDdtO5I4Nw4VfQ5nE"
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "0dngp/9gNO34wUQjZfN/CX"
},
{
"__type__": "cc.Canvas",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 7
},
"_enabled": true,
"__prefab": {
"__id__": 20
},
"_cameraComponent": {
"__id__": 9
},
"_alignCanvasWithScreen": true,
"_id": "35c5/lUi9OoIhZHTWCeAy6"
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "3f2oTdCepERZdpmIfLsrhd"
},
{
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 7
},
"_enabled": true,
"__prefab": {
"__id__": 22
},
"_alignFlags": 45,
"_target": null,
"_left": 0,
"_right": 0,
"_top": 0,
"_bottom": 0,
"_horizontalCenter": 0,
"_verticalCenter": 0,
"_isAbsLeft": true,
"_isAbsRight": true,
"_isAbsTop": true,
"_isAbsBottom": true,
"_isAbsHorizontalCenter": true,
"_isAbsVerticalCenter": true,
"_originalWidth": 0,
"_originalHeight": 0,
"_alignMode": 2,
"_lockFlags": 0,
"_id": "aeAqSWY9xJFKDQ498wcWjV"
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "e8a+bU/8dPDbbJguUzLdoF"
},
{
"__type__": "cc.SceneGlobals",
"ambient": {
"__id__": 24
},
"shadows": {
"__id__": 25
},
"_skybox": {
"__id__": 26
},
"fog": {
"__id__": 27
}
},
{
"__type__": "cc.AmbientInfo",
"_skyColor": {
"__type__": "cc.Color",
"r": 51,
"g": 128,
"b": 204,
"a": 1
},
"_skyIllum": 20000,
"_groundAlbedo": {
"__type__": "cc.Color",
"r": 51,
"g": 51,
"b": 51,
"a": 255
}
},
{
"__type__": "cc.ShadowsInfo",
"_type": 0,
"_enabled": false,
"_normal": {
"__type__": "cc.Vec3",
"x": 0,
"y": 1,
"z": 0
},
"_distance": 0,
"_shadowColor": {
"__type__": "cc.Color",
"r": 76,
"g": 76,
"b": 76,
"a": 255
},
"_autoAdapt": true,
"_pcf": 0,
"_bias": 0.00001,
"_packing": false,
"_linear": true,
"_selfShadow": false,
"_normalBias": 0,
"_near": 1,
"_far": 30,
"_aspect": 1,
"_orthoSize": 5,
"_maxReceived": 4,
"_size": {
"__type__": "cc.Vec2",
"x": 512,
"y": 512
}
},
{
"__type__": "cc.SkyboxInfo",
"_envmap": null,
"_isRGBE": false,
"_enabled": false,
"_useIBL": false
},
{
"__type__": "cc.FogInfo",
"_type": 0,
"_fogColor": {
"__type__": "cc.Color",
"r": 200,
"g": 200,
"b": 200,
"a": 255
},
"_enabled": false,
"_fogDensity": 0.3,
"_fogStart": 0.5,
"_fogEnd": 300,
"_fogAtten": 5,
"_fogTop": 1.5,
"_fogRange": 1.2
}
]
I known, there is a: "__prefab": null,
But how to fix that problem. Also, how to prevent that issue.
Thanks in advanced!
Hi @sunstar,
I also have the same problem.
My steps:
prefabs.It’s not always happened. But very easy to reproduce by repeat those steps.
I already tried cocos 3.2 & 3.2.1.
Error message in the console:
[preview-error]Uncaught TypeError: Cannot read property '__prefab' of null in http://localhost:7456/scripting/engine/bin/.cache/dev/preview/bundled/index.js
Could you please take a look?
can you send me the scene and prefab files (with .meta files),so i can have a check~
Here is my project file: Filebin | k3q0u9w71xautqxm
I solved my problem.
Because the error looks weird.
My problem is about Feature Crop.
I disable physics 2d feature.
But then, I added BoxColider component.
So that component will be null.
Thank you so much for fast reply & help.
Sorry for this inconvenience.