Search Issue Tracker

Fixed in 2017.2.0f3

Votes

18

Found in

5.5.0b4

Issue ID

831847

Regression

No

[Unet] Error: Assertion failed on expression: 'asset->mainRepresentation.type == TypeOf<GameObject>()' on build Standalone

Networking

-

This happens on all Multiplayer projects upgraded from 5.4. If you remove Library folder - this problem will gone. If you change Player object (for example remove some component) - this problem will gone.

2. How we can reproduce it using the example you attached
1 Open attached project and scene "sc1"
2 Press in menu File->Build and Run, select Standalone as build target and set name for the build and press "Build and Run"-button
Actual result: in the middle of the build process - this error should appear:
"Assertion failed on expression: 'asset->mainRepresentation.type == TypeOf<GameObject>()'
UnityEditor.BuildPlayerWindow:BuildPlayerAndRun()"

3 Find Player object prefab (it is called "Cube") in Project view and remove some component
4 Try to "Build and Run" again - it will be built without errors

Comments (8)

  1. 6225f4d69bd866f0d5a20d20b07f6cc0?d=mm

    CurtisMcGill

    Dec 12, 2017 20:54

    Deleting Library Folder DOES NOT make you RESTART

    1) Exit Unity.
    2) Delete or move the directory to a safe location.
    3) Run Unity
    4) It will REBUILD the Library Folder.

  2. 38c44358a5a06b19854ab47f6806e4b0?d=mm

    hardcorebadger

    May 08, 2017 16:18

    Deleting your library doesn't restart your project - it's just the unity cache files - all of "your project" is in the assets folder.

  3. 903943a3c196f68ce047329190785393?d=mm

    WilmuClass

    Feb 16, 2017 05:28

    Yes there is. I just fixed the issue by opened the [Camera Rig], Camerea(Head), Camera (Eye), and then pressed on collapse. The error is gone. GL all.

  4. B38432b400b0448489da87fbf8d6aee4?d=mm

    Morning_Fun_Game

    Jan 20, 2017 18:00

    It came out this issue when I using EditorPrefs.DeleteAll ( ).
    Please fix it.

  5. 9746878fd170891307bb46706af297a8?d=mm

    MrLucid72

    Nov 08, 2016 17:28

    Happens to me on Windows build. Nothing out of the ordinary ... we're a mplayer game, though. Not sure if that makes a diff

  6. Fa26543467120ee1f6a627eb70504b61?d=mm

    bueda

    Oct 19, 2016 10:20

    The issue occurs for me as well.
    I run Unity 5.5.0b2 on Linux, and the issue started appearing after upgrading my project to 5.5.0.b5 and subsequently downgrading back to 5.5.0b2 (as b5 had a couple of annoying bugs).

    I removed $project/Library (the Unity Editor cache directory), which was subsequently re-created on reopening the project, and the error is now gone.

    It seemed to have caused no issues except for the rather cryptic error messages.

  7. B10e5a44a37c0cda91acf4e90d555782?d=mm

    Filiecs

    Oct 06, 2016 04:24

    I have the same issue. It doesn't seem to affect the build, but it is strange.

  8. F88dc96e82cdad1f87bf93c8227b83b7?d=mm

    FoxCastz

    Sep 29, 2016 23:05

    Is there a fix to this that doesn't require that I delete my entire library, thus starting my project over?..

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.