Class BinaryAttribute
- Namespace
- GB
- Assembly
- GBSharp.Framework.dll
Copies a file into ROM unchanged.
[AttributeUsage(AttributeTargets.Field, AllowMultiple = false, Inherited = false)]
public sealed class BinaryAttribute : Attribute
- Inheritance
-
BinaryAttribute
- Inherited Members
Remarks
For data GB# has no opinion about: level layouts, a table another tool produced, anything already in the form your code wants. Nothing is converted and nothing is validated beyond the file being there, which is exactly the service being offered.
The alternative is a static readonly byte[] full of literals, which
works and is unreadable past about twenty bytes.
[Binary("level1.dat")]
private static BinaryAsset Level1;
byte first = Data.Read(Level1, 0);
Constructors
BinaryAttribute(string)
public BinaryAttribute(string path)
Parameters
pathstring
Properties
Path
The file, relative to the declaring file or the Assets folder.
public string Path { get; }