Skip to content

nischelwitzer/Unity_Helper_Tools

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Unity_Helper_Tools

Parameters in C# Files

[DefaultExecutionOrder(-100)]
[RequireComponent(typeof(Rigidbody))]

Special Folders

  • StreamingAssets folder (case-sensitive)
  • Resources Resources.Load

Text Assets Loading

[Header("Datei-Einstellungen")]
[Tooltip("Pfad zur TXT-Datei (Textformat, z. B. alex.txt)")]
public string myFile = "Assets/alex.txt";
[SerializeField] private TextAsset myText;
TextAsset file = Resources.Load("text/config") as TextAsset; // in Assets/Resources/text/config.txt
string content = file.toString();

Text Assets Parsing

string[] lines = txtFile.text.Split(
  new[] { "\r\n", "\r", "\n" }, System.StringSplitOptions.None);

foreach (var line in lines)
{
    var parts = line.Split(' ', '\t');
}

Debug Log Formating

Debug.Log($"Line has <color=yellow><b>{parts.Length}</b></color> parts: "+ partlist);

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages