private ImportedInspectorValues ProcessPrefabModifications(IPsiSourceFile currentSourceFile, AssetDocument assetDocument) { var result = new ImportedInspectorValues(); if (assetDocument.HierarchyElement is IPrefabInstanceHierarchy prefabInstanceHierarchy) { foreach (var modification in prefabInstanceHierarchy.PrefabModifications) { if (!(modification.Target is ExternalReference externalReference)) { continue; } if (modification.PropertyPath.Contains(".")) { continue; } var location = new LocalReference(currentSourceFile.PsiStorage.PersistentIndex.NotNull("owningPsiPersistentIndex != null"), PrefabsUtil.GetImportedDocumentAnchor(prefabInstanceHierarchy.Location.LocalDocumentAnchor, externalReference.LocalDocumentAnchor)); result.Modifications[new ImportedValueReference(location, modification.PropertyPath)] = (modification.Value, new AssetReferenceValue(modification.ObjectReference)); } } return(result); }
private static object Read(UnsafeReader reader) { var count = reader.ReadInt32(); var list = new List <InspectorVariableUsage>(count); for (int i = 0; i < count; i++) { list.Add(reader.ReadPolymorphic <InspectorVariableUsage>()); } var importedInspectorValues = ImportedInspectorValues.ReadFrom(reader); var result = new AssetInspectorValuesDataElement(list, importedInspectorValues); return(result); }
private AssetInspectorValuesDataElement(List <InspectorVariableUsage> inspectorValues, ImportedInspectorValues importedInspectorValues) { ImportedInspectorValues = importedInspectorValues; myVariableUsages = inspectorValues; }
public InspectorValuesBuildResult(LocalList <InspectorVariableUsage> inspectorValues, ImportedInspectorValues importedInspectorValues) { InspectorValues = inspectorValues; ImportedInspectorValues = importedInspectorValues; }