# Using the package

## Namespaces

<table data-header-hidden><thead><tr><th width="434"></th><th></th></tr></thead><tbody><tr><td><em>Lightbug.CharacterControllerPro</em></td><td>The main "root namespace" for this asset.</td></tr><tr><td><em>Lightbug.CharacterControllerPro.Core</em></td><td>The <em>core</em> code is hosted here (character actor, body, graphics, etc.).</td></tr><tr><td><em>Lightbug.CharacterControllerPro.Implementation</em></td><td>The <em>implementation</em> code is hosted here (state machine, state, actions, brain,platforms, etc.).</td></tr><tr><td><em>Lightbug.CharacterControllerPro.Demo</em></td><td>The demo code is hosted here (specific character states, demo scenes, menus, fps counters, etc. ).</td></tr><tr><td><em>Lightbug.Utilities</em></td><td>Here you will find all kind of useful static methods and extensions.</td></tr></tbody></table>

## Assembly

Assembly definitions are great when a tool/asset code needs to be isolated from game-related code.&#x20;

{% hint style="info" %}
For more information about why custom assemblies can be useful, please read the [documentation](https://docs.unity3d.com/2019.1/Documentation/Manual/ScriptCompilationAssemblyDefinitionFiles.html).
{% endhint %}

*Character Controller Pro* has includes its own assembly definition (*com.lightbug.character-controller-pro*).&#x20;

<figure><img src="https://3428853154-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LvxVSjyzvP6F7c9h_Hu%2Fuploads%2FOb6fTYRFSyWB7yXn3ozz%2Fimage.png?alt=media&#x26;token=19962802-0eeb-48f8-a3ac-311cdc0a2577" alt=""><figcaption></figcaption></figure>

### Modifying scripts from the demo

**Before version 1.4.11**, all the scripts were included as part of the main assembly.&#x20;

<figure><img src="https://3428853154-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LvxVSjyzvP6F7c9h_Hu%2Fuploads%2Fx3YvFZmCmebqopkwnECa%2Fimage.png?alt=media&#x26;token=62faadd1-d409-462a-97d9-f888ff61c95a" alt=""><figcaption></figcaption></figure>

As a result, **if a user wanted to modify demo components directly, he or she had to move the content they want outside the assembly** (e.g. *Assets/MyContent*). Otherwise, only scripts outside the assembly will be able to reference these demo scripts, but not the other way around. For example:

<figure><img src="https://3428853154-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LvxVSjyzvP6F7c9h_Hu%2Fuploads%2FnHkNGo8G92zXHtFjtUEF%2Fimage.png?alt=media&#x26;token=c01eb930-7e91-4737-9616-c13085269e9b" alt=""><figcaption></figcaption></figure>

From version 1.4.11 onwards, **all demo scripts have been moved outside the assembly**. This means that by default, **all these scripts live under the main C# assembly** (*Assembly-CSharp*). Because of this, the issue mentioned before is gone:

<figure><img src="https://3428853154-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LvxVSjyzvP6F7c9h_Hu%2Fuploads%2FIUO8y4GBUMlWHGL36hVt%2Fimage.png?alt=media&#x26;token=9c2c9474-bead-4a8b-851f-6f6a5a99ba47" alt=""><figcaption></figcaption></figure>

### Referencing the assembly

If you are using a custom assembly definition and you need to reference *Character Controller Pro* from within your assembly, you just need to go to the assembly definition file and add this reference:

![](https://3428853154-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LvxVSjyzvP6F7c9h_Hu%2F-MUW4ie_B3HtkTxSu4Ju%2F-MUW7Sz6REUIrq8qlccZ%2Fimagen.png?alt=media\&token=9e712e61-8e09-4067-8e4b-a641291b925d)

## API reference

The API reference is [available online](https://lightbug14.github.io/lightbug-web/character-controller-pro/Documentation/html/index.html).

![](https://3428853154-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LvxVSjyzvP6F7c9h_Hu%2F-LzNmKd5iWzr4JkaMKjg%2F-LzO9xkbvPVt9u9nC0cY%2Fimagen.png?alt=media\&token=af9ce263-bf1c-45a9-82ae-898c7eb184f9)

This documentation has been generated from the code itself using doxygen.

{% hint style="info" %}
There is no need to have this reference open, just type the method you want to use and the IDE/code editor should be able to show a description of it.
{% endhint %}

## Inspector fields

All relevant (serialized) fields have a [tooltip description](https://docs.unity3d.com/ScriptReference/TooltipAttribute.html) associated with them.
