The Photon Forum
is Closed Permanently.

After many dedicated years of service, we have made the decision to retire our Forum and switch to read-only: we´ve saved the best to last! Your search result can be found below. Plus, we offer support via these channels:

Try Our
Documentation

Please check if you can find an answer in our extensive documentation on Fusion.

Join Us
on Discord

Meet and talk to our staff and the entire Photon-Community via Discord.

Read More on
Stack Overflow

Find more information on Stack Overflow (for Circle members only).

Write Us
an E-Mail

Feel free to send your question directly to our developers.

Prefab table can't add Network objects

Remui
2023-05-23 10:50:47

Hello.

I'm just starting with the fusion tutorials. On the secon one (set Up a scene) when i create a NetworkObject, that one isnt included on the NetworkProjectConfig.PrefabTable, even when it have the isSpawnable check (also don't include the prototipes that brings the fusion unityPackaje). When I rebuild prefab Table it give the following error for all NetworkObjects:

Unable to create prefab asset for Assets/6.SCENES/01_Tests/NetworkTest/NetworkPlayerPrefab.prefab: System.NullReferenceException: Object reference not set to an instance of an object

at Fusion.NetworkPrefabAssetFactoryAddressable.CreateAddressablesLookup () [0x0002b] in C:\Users\boris\Proyectos\UnityProjects\BeeTheBest v.02\Assets\Photon\FusionAddressables\NetworkPrefabSourceUnityAddressable.cs:87

at Fusion.NetworkPrefabAssetFactoryAddressable.get_Lookup () [0x00008] in C:\Users\boris\Proyectos\UnityProjects\BeeTheBest v.02\Assets\Photon\FusionAddressables\NetworkPrefabSourceUnityAddressable.cs:57

at Fusion.NetworkPrefabAssetFactoryAddressable.Fusion.Editor.INetworkPrefabSourceFactory.TryCreate (System.String assetPath) [0x00007] in C:\Users\boris\Proyectos\UnityProjects\BeeTheBest v.02\Assets\Photon\FusionAddressables\NetworkPrefabSourceUnityAddressable.cs:69

at Fusion.Editor.NetworkPrefabSourceFactory.Create (System.String assetPath) [0x00013] in C:\Users\boris\Proyectos\UnityProjects\BeeTheBest v.02\Assets\Photon\Fusion\Scripts\Editor\Fusion.Editor.cs:71

at Fusion.Editor.NetworkProjectConfigImporter.DiscoverPrefabs (UnityEditor.AssetImporters.AssetImportContext ctx) [0x00032] in C:\Users\boris\Proyectos\UnityProjects\BeeTheBest v.02\Assets\Photon\Fusion\Scripts\Editor\NetworkProjectConfigImporter.cs:135

UnityEditor.AssetDatabase:ImportAsset (string)

Fusion.Editor.NetworkProjectConfigUtilities:SaveGlobalConfig (Fusion.NetworkProjectConfig) (at Assets/Photon/Fusion/Scripts/Editor/Fusion.Editor.cs:10219)

Fusion.Editor.NetworkProjectConfigUtilities:SaveGlobalConfig () (at Assets/Photon/Fusion/Scripts/Editor/Fusion.Editor.cs:10201)

Fusion.Editor.NetworkProjectConfigUtilities:RebuildPrefabTable () (at Assets/Photon/Fusion/Scripts/Editor/Fusion.Editor.cs:10197)

Any guess why it happens and how solve it?

Comments

Back to top