Skip to content

AttributeError with UnityPy ≥1.9 #1

@lilyknight39

Description

@lilyknight39

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions