Skip to content

Commit 8a931b7

Browse files
committed
API to acquire the props instance containing stock properties
1 parent 1fdc650 commit 8a931b7

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Source/DynamicProperties/MaterialPropertyManager.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,11 @@ public bool Unregister(Renderer renderer)
8484
return true;
8585
}
8686

87+
/// Get a reference to the `Props` instance containing the stock properties of the given
88+
/// `part` (namely, `_Opacity`, `_RimFalloff`, `_RimColor`, and `_TemperatureColor` (flight
89+
/// only)). The returned instance must not be written to.
90+
public Props? GetStockPropsForPart(Part part) => PartPatch.Props.GetValueOrDefault(part);
91+
8792
public static void RegisterPropertyNamesForDebugLogging(params string[] properties)
8893
{
8994
foreach (var property in properties) PropIdToName.Register(property);

0 commit comments

Comments
 (0)