# Asmdef

<div align="left"><img src="/files/-MPSn7jYA-mod1SRCkFV" alt=""></div>

<div align="left"><img src="/files/-MPSnCnV4ZDSl4bMGfni" alt=""></div>

### Asmdef?

Learn more about [asmdef](https://docs.unity3d.com/Manual/ScriptCompilationAssemblyDefinitionFiles.html) at Unity's docs.

### Advantage

Asmdef has multiple advantages such as editor performance and code organization, which is the best practice and commonly used by official unity packages.

### Notices

Since with asmdf setup, you cannot reference other code in other assemblies without asmdef directly (e.g. you wanted to modify rgs's scripts directly and referenced some code that is outside of the rgs assembly.)&#x20;

There are few ways you can go about this

* (Dirty way) Remove the two asmdef file
* (Ok way) Add custom `UnityEvent` or plain old c# event to hook up your custom logic if needed, so there won't be direct code reference in between.
* (Best way) Have you custom code setup with asmdef, and reference your asmfef to rgs asmdef, this way you can properly reference your code inside rgs assembly.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://bennykok.gitbook.io/rhythm-game-starter/advance/asmdef.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
