#since essentially i m trying to extend

1 messages · Page 1 of 1 (latest)

rain fulcrum
#

It's tricky. These things are internal for good reasons. There can be quite tight coupling between C# and a native codepath, so you can run into a slew of issues that won't be as simple as extending some managed types and enums. Getting an inspector to now iterate over an additional injected enum could ripple into unintended consequences where native code is missing the corresponding binding / doesn't handle a new enum value etc....

I can't speak specifically to this side of the engine since it's not my domain, but for extending hardwareSupportsFullNPOT you're gonna have problems since while you can replace this call with your own impl using reflection or ILWeaving, this is backed by a native implementation which other native parts of Unity may be invoking which will not see your extended functionality (since they call the native function directly not your managed replacement)

old pumice
#

not exactly what i am trying to do. i was trying to extend from TextureImporterInspector since for any importable texture in unity, that is the importer inspector that's displayed. since that's not really possible, i tried to 1 : 1 copy / paste it into my custom ScriptedImporterInspector but while i can resolve most dependencies, things like ShaderUtil.hardwareSupportsFullNPOT just don't even exist when trying to do it this way.

rain fulcrum
#

things like ShaderUtil.hardwareSupportsFullNPOT just don't even exist when trying to do it this way.
This part I don't fully know what you mean. My guess would be that it doesn't exist because that is a property that is extern so it binds to native code that would need to provide the implementation which ends up relating to the problems I describe above