Unity bug or photon bug? (build dependencies prob)

Unity 3.5.0f1
Create new empty project
import Photon Unity Networking from asset store
save *empty* scene
build your standalone player on Mac
Look at Editor log. It's including all the Assets from Photon including the Demo scene and about 3MB of textures. :( See bold items below.

Let me know if I should submit a Unity bug report on this or if it's a Photon issue. Thanks! Alex

Mono dependencies included in the build
Mono.Security.dll
System.Core.dll
System.dll
mscorlib.dll
Photon3Unity3D.dll
Assembly-CSharp.dll

Unloading 5 Unused Serialized files (Serialized files now loaded: 0 / Dirty serialized files: 0)

Unloading 622 unused Assets to reduce memory usage. Loaded Objects now: 932. Operation took 69.259537 ms.
System memory in use: 96.3 MB.

Textures 2.0 mb 27.2%
Meshes 305.8 kb 4.1%
Animations 919.2 kb 12.2%
Sounds 0.0 kb 0.0%
Shaders 0.0 kb 0.0%
Other Assets 7.8 kb 0.1%
Levels 8.9 kb 0.1%
Scripts 200.3 kb 2.7%
Included DLLs 3.9 mb 53.5%
File headers 12.5 kb 0.2%
Complete size 7.4 mb 100.0%

Used Assets, sorted by uncompressed size:
1.3 mb 18.1% Assets/Photon Unity Networking/DemoWorker/Art/Character Controllers/Sources/PrototypeCharacter/Textures/constructor_normals.png
1.2 mb 16.3% Assets/Photon Unity Networking/DemoWorker/Art/Character Controllers/Sources/PrototypeCharacter/Constructor.FBX
682.8 kb 9.1% Assets/Photon Unity Networking/DemoWorker/Art/Character Controllers/Sources/PrototypeCharacter/Textures/constructor_diffuse.png
7.5 kb 0.1% Assets/Photon Unity Networking/DemoWorker/Resources/Player.prefab
0.2 kb 0.0% Assets/Photon Unity Networking/DemoWorker/Art/Character Controllers/Sources/PrototypeCharacter/Materials/constructor_done.mat

0.1 kb 0.0% Assets/Photon Unity Networking/Resources/PhotonServerSettings.asset
0.1 kb 0.0% Assets/Photon Unity Networking/DemoWorker/Scripts/Game/Player/ThirdPersonController.cs
0.1 kb 0.0% Assets/Photon Unity Networking/Plugins/PhotonNetwork/LoadbalancingPeer.cs
0.1 kb 0.0% Assets/Photon Unity Networking/DemoWorker/Scripts/Game/Player/ThirdPersonNetwork.cs
0.1 kb 0.0% Assets/Photon Unity Networking/DemoWorker/Scripts/Game/Player/ThirdPersonCamera.cs

0.1 kb 0.0% Assets/Photon Unity Networking/Plugins/PhotonNetwork/ServerSettings.cs
0.1 kb 0.0% Assets/Photon Unity Networking/Plugins/PhotonNetwork/PhotonNetwork.cs
0.1 kb 0.0% Assets/Photon Unity Networking/Plugins/PhotonNetwork/PhotonHandler.cs
0.1 kb 0.0% Assets/Photon Unity Networking/Plugins/PhotonNetwork/PhotonClasses.cs
0.1 kb 0.0% Assets/Photon Unity Networking/Plugins/PhotonNetwork/NetworkingPeer.cs
0.1 kb 0.0% Assets/Photon Unity Networking/Plugins/PhotonNetwork/PhotonPlayer.cs
0.1 kb 0.0% Assets/Photon Unity Networking/Plugins/PhotonNetwork/Extensions.cs
0.1 kb 0.0% Assets/Photon Unity Networking/Plugins/PhotonNetwork/Extension/PhotonView.cs
0.1 kb 0.0% Assets/Photon Unity Networking/Plugins/PhotonNetwork/CustomTypes.cs
0.1 kb 0.0% Assets/Photon Unity Networking/DemoWorker/Scripts/Menu/EnableScript.cs
0.1 kb 0.0% Assets/Photon Unity Networking/DemoWorker/Scripts/Game/GameManager.cs

0.1 kb 0.0% Assets/Photon Unity Networking/Plugins/PhotonNetwork/Enums.cs
0.1 kb 0.0% Assets/Photon Unity Networking/DemoWorker/Scripts/Menu/MainMenu.cs
0.1 kb 0.0% Assets/Photon Unity Networking/Plugins/PhotonNetwork/Room.cs
0.1 kb 0.0% Assets/Photon Unity Networking/DemoWorker/Scripts/Game/Chat.cs

Comments

  • Hmm...I think it's happening with other packages too... to varying degrees. I posted a note on the Unity Beta list.
  • Seeing that its even including the scene it must be a 3.5 bug indeed.
  • Yeah I think so.. according to Unity engineer it's normal for the scripts to all be included. However textures and prefabs seems wrong to me. I will submit a bug report to Unity. It's easy to just delete the DemoWorker folder before building (if I can remember that is :)
  • Aras from Unity just clarified: it's because you have a folder named "Resources" and so it's including the prefab that's in there, during any build. You should rename that to DemoWorkerResources or something else!
    Thanks,
    Alex
  • Arg sorry, I don't know where I thought you said it included the scene.
    For the demo the prefab needs to be under a resources folder as that is required for PhotonNetwork.Instantiate.

    You can just remove the demo folder after integrating a new version of PUN. Furthermore if you dont want to rely on Resources/ folders when using PhotonNetwork.Instantiate, you'll have to allocate viewIDs manually.
  • Ah OK I think I see what you mean. So far my usage of Photon is only RPCs but I'll keep that in mind. Thanks -Alex
Sign In or Register to comment.