3 ms·
Agreed. I code in C# and there's facility for bundling assets into the binary but they're handled at the project file level and not the C# file level, and this
by Pxtl 10y ago
Agreed. I code in C# and there's facility for bundling assets into the binary but they're handled at the project file level and not the C# file level, and this means the keys to access this binary content is not available as a compile-time constant. You're still just passing strings around and hoping they match.
Having first-class language support for resource files looks fantastic.
- voltagex_ 10y agoI wonder how XNA's asset pipelines worked. I also wonder if you could "pack" a binary into an assembly by writing a tiny bit of IL around it.
- voltagex_ 10y agohttp://stackoverflow.com/a/28191247 http://stackoverflow.com/a/28191247
- Pxtl 10y agoYeah, that's the workflow I was mentioning, cooking the file into a resource by referencing it as resource in the csproj, but then it's keyed by a string of the file-path within the project file, which isn't nearly as nice as having it bound to a variable in C#.
- flukus 10y ago> and this means the keys to access this binary content is not available as a compile-time constant Isn't that exactly what resource files give you or am I confusing something? Anything you add in resource files have are accessible as a static variable.
- Sean1708 10y agoIt looks like you're right (for C# at least): https://msdn.microsoft.com/en-us/library/7k989cfy(v=vs.90).aspx#Anchor_2 https://msdn.microsoft.com/en-us/library/7k989cfy(v=vs.90).a...