sbox-issues icon indicating copy to clipboard operation
sbox-issues copied to clipboard

Add picker for any file extension (extend ResourceTypeAttribute)

Open LVJohnFreeman opened this issue 7 months ago • 0 comments

What can't you do?

Reopen/copy of #3743

Reason for this is because Matt said there should be something that already exists (?), but I cant seem to find anything that is readily available or that anybody knows about? Image

My two cases of needing this was:

First one to support videos for various use cases. Be it for in-game screens for display or whatever else. That's pretty self explanatory and is lacking for a lot of people.

The other is smidge less conventional within S&Box, as I wanted to nicely pack my razor files alongside other useful features within a gameresource. One could do it on a prefab, but it's more conveniant for my use-case to do it within gameresource personally (just nicely packed that way and more consistent for mysstuff).

How would you like it to work?

In best case scenario I'd want to do be able to do something like this (like in the original issue):

[ResourceType( "*" )]
public string FilePath { get; set; }

But in case of not wanting to do that specifically, just have stuff like videos, razor and equivalent supported. I feel like at least these two should be supported.

What have you tried?

Tried doing it manually through a string, but its super annoying. Please no.

Additional context

No response

LVJohnFreeman avatar May 19 '25 19:05 LVJohnFreeman