Remove unused methods from IExportContainer

This commit is contained in:
Jeremy Pritts 2023-07-05 17:05:10 -04:00
parent 2ac8180007
commit 85ee73c310
3 changed files with 3 additions and 20 deletions

View File

@ -14,10 +14,7 @@ namespace AssetRipper.Assets.Export
MetaPtr CreateExportPointer(IUnityObjectBase asset);
UnityGUID SceneNameToGUID(string name);
string SceneIndexToName(int sceneID);
bool IsSceneDuplicate(int sceneID);
string TagIDToName(int tagID);
ushort TagNameToID(string tagName);
AssetCollection File { get; }
TemporaryAssetCollection VirtualFile { get; }

View File

@ -22,6 +22,7 @@ namespace AssetRipper.Export.UnityProjects.Project
{
m_exporter = exporter ?? throw new ArgumentNullException(nameof(exporter));
VirtualFile = file ?? throw new ArgumentNullException(nameof(file));
CurrentCollection = null!;
foreach (IUnityObjectBase asset in assets)
{
@ -120,23 +121,8 @@ namespace AssetRipper.Export.UnityProjects.Project
return default;
}
public string SceneIndexToName(int sceneIndex)
{
return m_buildSettings == null ? $"level{sceneIndex}" : m_buildSettings.Scenes_C141[sceneIndex].String;
}
public bool IsSceneDuplicate(int sceneIndex) => SceneHelpers.IsSceneDuplicate(sceneIndex, m_buildSettings);
public string TagIDToName(int tagID)
{
return m_tagManager.TagIDToName(tagID);
}
public ushort TagNameToID(string tagName)
{
return m_tagManager.TagNameToID(tagName);
}
public IExportCollection CurrentCollection { get; set; }
public TemporaryAssetCollection VirtualFile { get; }
public virtual AssetCollection File => CurrentCollection.File;

View File

@ -31,9 +31,9 @@ namespace AssetRipper.SourceGenerated.Extensions
private static bool ShouldBeActive(this IGameObject gameObject)
{
if (IsActiveInherited(gameObject.Collection.Version))
if (IsActiveInherited(gameObject.Collection.Version) && !gameObject.Collection.IsScene)
{
return gameObject.Collection.IsScene ? gameObject.GetIsActive() : true;
return true;
}
return gameObject.GetIsActive();
}