Search Unity

Referencing .asset files with C# script

Discussion in 'Scripting' started by Toastendo, Sep 20, 2020.

  1. Toastendo

    Toastendo

    Joined:
    Nov 20, 2018
    Posts:
    22
    Hi, I was wondering if ther was a way to reference a .asset file, if so how?
     
  2. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    38,752
    .asset files are just files... the .asset part is simply an extension Unity uses.

    What's in there is dependent entirely on what version of Unity you are using (it will change frequently when you upgrade Unity), as well as what type of asset it is and also what type of serialization you have selected in the editor, either binary or text. Usually they contain YAML. All ScriptableObjects are created as .asset files, and other files are too, such as all the contents of the ProjectSettings directory.