Problem
Running the project under UnityPy 1.9 or newer raises:
AttributeError: 'AudioClip' object has no attribute 'name'
Analysis
UnityPy removed the public attribute AudioClip.name, so direct access fails.
Proposed Fix
if hasattr(clip, "name"):
name = clip.name
else:
name = getattr(clip, "m_Name", "") or f"clip_{index}"
• Back-compatible with UnityPy < 1.9
• <10 lines of change, covered by a small test
Thanks for your time.
Problem
Running the project under UnityPy 1.9 or newer raises:
Analysis
UnityPy removed the public attribute
AudioClip.name, so direct access fails.Proposed Fix
• Back-compatible with UnityPy < 1.9
• <10 lines of change, covered by a small test
Thanks for your time.