- Home /
Problem with uploading to asset store and prefabs
I tried uploading my first package to the asset store but prefabs don't work on the other end. There are no issues on my side, no errors or anything. I tried importing package from the temp folder (one that gets created while uploading) to blank project (worked fine there) and reuploading from there it but the issue remained.
Here is the screenshot of the problem on the other side I got:
https://imgur.com/a/8rLM7wi
And here is the package from the temp folder:
https://mega.nz/#!ys1ACQpa!0Cxu1aA6WYlKzcA5ZHGHwJ4jqO0blAkr4r0ndH3Z800
Answer by Bunny83 · Jul 25, 2018 at 08:33 AM
Ok i just had a look at your files and it seems the prefab got corrupted during the import. This seems to be a bug in Unity when they export the package. At least the exported prefab is not compatible with Unity 2018.1.3f1 Which Unity version do you use?
Specifically: This is how your prefab looks like:
Prefab:
m_ObjectHideFlags: 1
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 0}
m_Modifications: []
m_RemovedComponents: []
m_SourcePrefab: {fileID: 0}
m_RootGameObject: {fileID: 1636630371588574}
m_IsPrefabAsset: 1
And this is how it should look like so it's recognised correctly:
Prefab:
m_ObjectHideFlags: 1
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 0}
m_Modifications: []
m_RemovedComponents: []
m_ParentPrefab: {fileID: 0}
m_RootGameObject: {fileID: 1636630371588574}
m_IsPrefabParent: 1
Note the only changes are that "m_SourcePrefab" should be "m_ParentPrefab" and "m_IsPrefabAsset" should be "m_IsPrefabParent".
At least when i rename those two i can now drag the prefab into the scene. Your original prefabs couldn't be dragged to the scene. I got a warning that goes like this:
Unable to instantiate prefab. Prefab may be broken.
Note that i've seen a lot other things that also got renamed but those doesn't seem to cause any problems. However it looks like your exported prefab format is no longer compatible. How was that unitypackage generated? From the name i guess you used the upload tools from the assetstore? Did you use the newest version?
Anyways
i would recommend to file a bugreport that the prefab format has some compatibility issues. You could include a link to this question in your bugreport.
Note that even i changed those two things i've mentioned in the prefab, the scene still has missing prefabs even i can now manually instantiate them. $$anonymous$$aybe there are even more issues with the prefabs.
edit
Yes, i managed to get the scene working by also checking the scene file. The prefab instance in the scene also had a "m_SourcePrefab" reference. After rena$$anonymous$$g to "m_ParentPrefab" the scene opened correctly.
I was using Unity 2018.2.0f2 and the latest version of Asset Store Tools from the asset store but I think my first try was with the older version, there was the same issue. And yes, the package was generated automatically when I clicked 'upload', it opened the temp folder in the project and it was there, I figured that's the one that should be tested.
I've sent the bug report.
Answer by cyenketswamy · May 21, 2019 at 09:16 PM
This is my workaround to fixed broken prefabs. I had submitted a package to the asset store and my prefabs on their side was showing pink yet in my project it was fine. After being declined I rechecked by importing the prefab into another project and clearly there was an issue with a broken prefab. The materials was missing from the prefab. The solution was to package all the problematic prefabs into a Unity package delete the prefabs from my project then reimport the custom package into the folder structure. This is clearly a Unity issue with their prefab creation process.