Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

In Unreal Engine, understanding the difference between relative paths and absolute paths is crucial for managing file locations and references. Let’s break it down:

  1. Relative Paths:

    • A relative path is defined in relation to a current working directory or a base location.

    • It specifies the path from the current location to a target location.

    • When you use a relative path, Unreal Engine starts from the current location and navigates to the desired file or directory.

    • For example, if you have a file named “Texture.png” in a folder called “Textures,” a relative path to that file might be "Textures/Texture.png".

    • Relative paths are useful when you want to reference files within the same project or directory structure.

  2. Absolute Paths:

  3. An absolute path always starts from the root directory (usually denoted by a forward slash /).

  4. It provides the full path from the root to the target location.

  5. Absolute paths are independent of the current working directory.

  6. For instance, if you have a file located at "C

    :

    /MyProject/Textures/Texture.png", this is an absolute path.

    • Absolute paths are useful when you need to access files outside the project directory or when specifying a fixed location.

In summary:

...

Relative paths are based on the current location, while absolute paths start from the root directory.

...

How to get paths:

...

Info

If you print this absolute path, you will get complete path starting from drive, similarly if you print relative path, you will get path of the project like “Content/Saved/”

Eagle 3D Streaming’s System supports absolute paths. It is suggested to use that whenever possible to avoid any problems.