Search Unity

What are "Libraries" in unity?

Discussion in 'Scripting' started by EthanWasHere_, May 10, 2021.

  1. EthanWasHere_

    EthanWasHere_

    Joined:
    Mar 4, 2021
    Posts:
    8
    Sorry if i'm in the wrong category but what count as "Libraries" in unity?
     
  2. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    38,745
    It generically means any package or suite of code (and possibly assets) generally intended to work together.

    Examples: TextMeshPRO, ProBuilder, UnityPurchasing, the OpenCV package, etc.
     
    Bunny83 likes this.
  3. EthanWasHere_

    EthanWasHere_

    Joined:
    Mar 4, 2021
    Posts:
    8
    Does
    using System.Collections;
    using System.Collections.Generic;
    using UnityEngine;
    count as a library as well?
     
  4. PraetorBlue

    PraetorBlue

    Joined:
    Dec 13, 2012
    Posts:
    7,911
    Those are namespaces https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/namespaces/. Many "libraries" use namespaces to organize their code - but there's no requirement that they do so or that a namespace contains code only from a single library, or that a single library contains only code in one namespace. They are orthogonal concerns.

    The truth is the word "Library" has many confusing and interrelated meanings.

    There's "library" in the "software library" sense - the way Kurt described. https://en.wikipedia.org/wiki/Library_(computing)
    There's the Library folder (in the root folder of your project) which is a folder that Unity uses to store compiled scripts and other temporary artifacts that are used for running and building the game.
    There's the Library folder that Mac OSX puts your data in when you use Application.persistentDataPath.
     
    Bunny83 likes this.
  5. EthanWasHere_

    EthanWasHere_

    Joined:
    Mar 4, 2021
    Posts:
    8
    Thanks guys I think I'm starting to get it!
     
    SparkesRS likes this.