Raymarcher Technical & APi Documentation
Raymarcher Attributes - RMAttributes
Namespace: Raymarcher.Attributes
Raymarcher features a custom attributes library that enhances the Raymarcher in the Unity editor.
You are free to use this library to enhance your editor visuals and create conditional fields with dynamic backgrounds.
// Create a conditional field (enums, bools, object references and ints only).
//  Formal example:
  [ShowIf(string fieldNames, int fieldValue, bool addIndentLevel = true, bool notEquals = false, bool setFieldToOppositeValueIfConditionNotMet = false, bool orOperator = true, float backColorPanelOpacity = 0, bool backColorPanelAdjustToTopField = false)]
//  Practical example:
  [ShowIf("useDithering|useSSAO", 1)]

// Draw a read-only field in the editor.
//  Formal example:
  [ReadOnly]
  
// Draw a button field in the editor replacing the target field.
//  Formal example:
  [Button(string displayText, string methodNameWithNoParameter)]
//  Practical example:
  [Button("Destroy Object", "DestroyObject")]
  
// Draw a grayscale background under specific fields.
//  Formal example:
  [DrawBackgroundPanel(float backColorPanelOpacity, float backColorContentPanelOpacity = 0)]
//  Practical example:
  [DrawBackgroundPanel(0.8f, 1f)]
  
// Highlight certain field contents in cyan.
//  Formal example:
  [Required]
  
// Create an info-box dependency in the editor. An existing object must be specified and will be highlighted in the editor once clicked on the button.
//  Formal example:
  [Dependency(string dependentOn, string fieldToHighlight, Type typeToSelect, bool plural = false, string dependencySubject = "global feature")]
//  Practical example:
  [Dependency("Fresnel Effect", "fresnelEffect", typeof(RMRenderMaster))]