Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Add HNA CB2 Support#78

Open
E2Nya wants to merge 7 commits into
Escartem:master from
E2Nya:master
Open

Add HNA CB2 Support #78
E2Nya wants to merge 7 commits into
Escartem:master from
E2Nya:master

Conversation

@E2Nya

@E2Nya E2Nya commented Apr 7, 2026

Copy link
Copy Markdown

HNA CB2 support has been added

Copy link
Copy Markdown
Owner

Your pr is marking full file diffs instead of specific lines so it'll take a bit of time to review everything

Copy link
Copy Markdown
Contributor

@E2Nya you could just add the logic here

switch (m_Component)
{
case Transform m_Transform:
Logger.Verbose($"Fetched Transform component with {m_Transform.m_PathID} in file {m_Transform.assetsFile.fileName}, assigning to GameObject components...");
m_GameObject.m_Transform = m_Transform;
break;
case MeshRenderer m_MeshRenderer:
Logger.Verbose($"Fetched MeshRenderer component with {m_MeshRenderer.m_PathID} in file {m_MeshRenderer.assetsFile.fileName}, assigning to GameObject components...");
m_GameObject.m_MeshRenderer = m_MeshRenderer;
break;
case MeshFilter m_MeshFilter:
Logger.Verbose($"Fetched MeshFilter component with {m_MeshFilter.m_PathID} in file {m_MeshFilter.assetsFile.fileName}, assigning to GameObject components...");
m_GameObject.m_MeshFilter = m_MeshFilter;
break;
case SkinnedMeshRenderer m_SkinnedMeshRenderer:
Logger.Verbose($"Fetched SkinnedMeshRenderer component with {m_SkinnedMeshRenderer.m_PathID} in file {m_SkinnedMeshRenderer.assetsFile.fileName}, assigning to GameObject components...");
m_GameObject.m_SkinnedMeshRenderer = m_SkinnedMeshRenderer;
break;
case Animator m_Animator:
Logger.Verbose($"Fetched Animator component with {m_Animator.m_PathID} in file {m_Animator.assetsFile.fileName}, assigning to GameObject components...");
m_GameObject.m_Animator = m_Animator;
break;
case Animation m_Animation:
Logger.Verbose($"Fetched Animation component with {m_Animation.m_PathID} in file {m_Animation.assetsFile.fileName}, assigning to GameObject components...");
m_GameObject.m_Animation = m_Animation;
break;
}
(or after processing all of the gameobjects components just to be sure no one m_SkinnedMeshRenderer is missing)
like
case MonoBehaviour { Name: "MonoSkinnedMeshTessellationDataHolder" } m_MonoBehaviour:
 m_MonoBehaviour.reader.Reset();
 Logger.Verbose($"Fetched MonoBehaviour:MonoSkinnedMeshTessellationDataHolder component with {m_MonoBehaviour.m_PathID} in file {m_MonoBehaviour.assetsFile.fileName}, assigning to GameObject components...");
 var skinnedMeshTessellationDataPPtr = new MonoSkinnedMeshTessellationDataHolder(m_MonoBehaviour.reader);
 skinnedMeshTessellationDataPPtr.data.TryGet(out var skinnedMeshTessellationData);
 if (skinnedMeshTessellationData != null && m_GameObject.m_SkinnedMeshRenderer != null)
 m_GameObject.m_SkinnedMeshRenderer.m_Mesh = skinnedMeshTessellationData.m_OriginalMesh;
 break;
public class MonoSkinnedMeshTessellationDataHolder : MonoBehaviour
{
	public PPtr<SkinnedMeshTessellationData> data;
	public MonoSkinnedMeshTessellationDataHolder(ObjectReader reader) : base(reader)
	{
		data = new PPtr<SkinnedMeshTessellationData>(reader);
	}
}

for reference:

public class MonoSkinnedMeshTessellationDataHolder : MonoBehaviour, F1F916908CD2C439
{
	// Fields
	public SkinnedMeshTessellationData data;
	public E859E4646D4CC5B9 mode;
	public FA2BDE3254709489 screenLengthMinThreshold;
	public FA2BDE3254709489 screenLengthMaxThreshold;
	public FA2BDE3254709489 grazingAngleMaxThreshold;
	public FA2BDE3254709489 smoothDistanceBegin;
	public FA2BDE3254709489 smoothDistanceEnd;
	public FA2BDE3254709489 importanceBias;
	public FA2BDE3254709489 importanceScale;
	public FA2BDE3254709489 maxImportance;
	public BE4CD025D7274026 cost;
	private AB4B4A429565C246 BA5FBAE68547DFBE;
	private SkinnedMeshRenderer B8D4A82A4FEB196B;
}
public enum E859E4646D4CC5B9
{
	// Fields
	public AB4B4A429565C246 value__;
	public const E859E4646D4CC5B9 Never = 0;
	public const E859E4646D4CC5B9 Always = 1;
	public const E859E4646D4CC5B9 Adaptive = 2;
	public const E859E4646D4CC5B9 Aggressive = 3;
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /