Search Issue Tracker
By Design
By Design in 6000.5.X
Votes
0
Found in
6000.0.65f1
6000.3.3f1
6000.4.0b3
6000.5.0a4
Issue ID
UUM-130890
Regression
No
Scripted Importer Serialized Members are null when reimporting all Assets
How to reproduce:
1. Open the attached “IN-128216” project
2. Right click the “test” Asset and select "Reimport"
3. Take note of the confirmation message in the Console window
4. Right click any asset and select "Reimport All"
5. Observe the result
Actual result: No errors occur in the Console window
Expected result: A “prefab is null” error occurs
Reproducible with: 6000.0.0b14, 6000.0.65f1, 6000.3.3f1, 6000.4.0b3, 6000.5.0a4
Could not test with: 6000.0.0b13 (no Serialized Member in the Inspector of the “test” Asset)
Reproduced on: Windows 11
Not reproduced on: No other environment tested
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- [Linux] Cannot reorder GameObjects in the Hierarchy when the AI Assistant package is installed
- [iOS] Text Input field stops receiving changes when the "Cancel" button is used on the soft keyboard
- [WebGPU] URP RenderGraph RenderPass doesn't clear textures
- Query Builder items display raw code style names instead of human readable labels in search field
- “+” button does nothing and has no functionality when clicked in Human Template "Bone Template" list
Resolution Note:
ScriptedImporter provided in the repro case is not setting up a dependency to the prefab being referenced. A dependency must be registered an prefab and this can be done using https://docs.unity3d.com/6000.3/Documentation/ScriptReference/AssetImporters.AssetImportContext.DependsOnArtifact.html.
In the provided repro, the artifact dependency can be setup like this:
////
// Check if reference is set
if (!object.ReferenceEquals(prefab, null))
{
int instanceID = prefab.GetEntityId();
// Retrieve the GUID associated with that InstanceID
if (AssetDatabase.TryGetGUIDAndLocalFileIdentifier(instanceID, out string guidString, out long localId))
{
if (GUID.TryParse(guidString, out GUID artifactGuid))
{
// Register artifact dependency to asset referenced.
ctx.DependsOnArtifact(artifactGuid);
}
}
}
////
Resolution Note (6000.5.X):
ScriptedImporter provided in the repro case is not setting up a dependency to the prefab being referenced. A dependency must be registered an prefab and this can be done using https://docs.unity3d.com/6000.3/Documentation/ScriptReference/AssetImporters.AssetImportContext.DependsOnArtifact.html.
In the provided repro, the artifact dependency can be setup like this:
////
// Check if reference is set
if (!object.ReferenceEquals(prefab, null))
{
int instanceID = prefab.GetEntityId();
// Retrieve the GUID associated with that InstanceID
if (AssetDatabase.TryGetGUIDAndLocalFileIdentifier(instanceID, out string guidString, out long localId))
{
if (GUID.TryParse(guidString, out GUID artifactGuid))
{
// Register artifact dependency to asset referenced.
ctx.DependsOnArtifact(artifactGuid);
}
}
}
////