Unity's SerializedProperty not support custom type value setting. This extension use Reflection to get target instance of SerializedProperty in Custom Editor, made value setting of general type is posible.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using UnityEngine; | |
| using UnityEngine.Rendering; | |
| using UnityEngine.Rendering.LWRP; | |
| // Inheriting from `ScriptableRendererFeature` will add it to the | |
| // `Renderer Features` list of the custom LWRP renderer data asset. | |
| public class RenderMyCustomPass : ScriptableRendererFeature | |
| { | |
| private class MyCustomPass : ScriptableRenderPass | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Shader "Name" { | |
| Properties { | |
| _Name ("display name", Range (min, max)) = number | |
| _Name ("display name", Float) = number | |
| _Name ("display name", Int) = number | |
| _Name ("display name", Color) = (number,number,number,number) | |
| _Name ("display name", Vector) = (number,number,number,number) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using UnityEngine; | |
| public static class ConfigurableJointExtensions | |
| { | |
| /// <summary> | |
| /// Sets a joint's targetRotation to match a given local rotation. | |
| /// The joint transform's local rotation must be cached on Start and passed into this method. | |
| /// </summary> | |
| public static void SetTargetRotationLocal (this ConfigurableJoint joint, Quaternion targetLocalRotation, Quaternion startLocalRotation) | |
| { |