Is it possible to enumerate all properties in a material (without reference to the shader)?

While Materials are typically a dictionary of values for the properties of a specific shader, it is possible for a Material to have properties defined that are not in the assigned shader. (Which are used, for example, when RenderWithShader() is called.)

Is it possible to enumerate or otherwise access these, if it is not known ahead of time what they are? (I.e. they don’t exist in the currently assigned shader)

The motivation is an asset processing script. Right now I maintain a list of textures that will eventually be atlased and applied to submesh. I would like to refactor this to work more closely with Unity Materials to better inter-operate with other components (using Unity Materials instead of my own property collection) but the atlas set will contain more properties than exist in any single shader. (To put it another way, I want to use Material as a generic dictionary)

Does this function help? Unity - Scripting API: MaterialEditor.GetMaterialProperties

Thanks liotral, I had not seen that before!

After more investigation and prototyping with MaterialProperty, I realise my impression of Material was too simplistic, and in fact it really should not used like this (and if there was a way to use it like this - e.g. a subclassing - it would break a number of conventions and would not be any more intuitive), so I’ve gone further the other way and made my own class more extensive. Its more code, but its obvious what is happening.