浏览代码

Added ifdef guards around Editor code to fix script compile errors when building a player.

/main
uygar 8 年前
当前提交
7f34a973
共有 3 个文件被更改,包括 14 次插入0 次删除
  1. 4
      Assets/ScriptableRenderPipeline/AdditionalLightData.cs
  2. 8
      Assets/ScriptableRenderPipeline/common/Shadow/Shadow.cs
  3. 2
      Assets/ScriptableRenderPipeline/common/Shadow/ShadowBase.cs

4
Assets/ScriptableRenderPipeline/AdditionalLightData.cs


shadowDataFormat = shadowData.format;
return shadowData.data;
}
#if UNITY_EDITOR
#endif
private int FindShadowData( int shadowDataFormat )
{
for( int i = 0; i < shadowDatas.Length; ++i )

}
}
#if UNITY_EDITOR
[UnityEditor.CustomEditor(typeof(AdditionalLightData))]
[UnityEditor.CanEditMultipleObjects]
public class AdditionalLightDataEditor : UnityEditor.Editor

serializedObject.ApplyModifiedProperties();
}
}
#endif
}

8
Assets/ScriptableRenderPipeline/common/Shadow/Shadow.cs


float ValScale;
public ValRange( string name, float valMin, float valDef, float valMax, float valScale ) { Name = new GUIContent( name ); ValMin = valMin; ValDef = valDef; ValMax = valMax; ValScale = valScale; }
#if UNITY_EDITOR
#else
public void Slider( ref int currentVal ) {}
#endif
public int Default() { return ShadowUtils.Asint( ValScale * ValDef ); }
}
readonly ValRange m_DefPCF_DepthBias = new ValRange( "Depth Bias", 0.0f, 0.05f, 1.0f, 000.1f );

private void BlurSlider( ref int currentVal )
{
#if UNITY_EDITOR
#endif
}
override protected void Register( GPUShadowType type, ShadowRegistry registry )

m_MaxShadows[(int)GPUShadowType.Spot ,0] = m_MaxShadows[(int)GPUShadowType.Spot ,1] = 8;
m_MaxShadows[(int)GPUShadowType.Directional,0] = m_MaxShadows[(int)GPUShadowType.Directional ,1] = 2;
#if UNITY_EDITOR
#endif
}
public override void UpdateCullingParameters( ref CullingParameters cullingParams )

2
Assets/ScriptableRenderPipeline/common/Shadow/ShadowBase.cs


void DrawWidgets( Light l, GPUShadowType shadowType, ShadowAlgorithm shadowAlgorithm, ShadowVariant shadowVariant, ShadowPrecision shadowPrecision, bool globalOverride )
{
#if UNITY_EDITOR
var dict = m_Entries[(int)shadowType];
int[] algoOptions = new int[dict.Count];
GUIContent[] algoDescs = new GUIContent[dict.Count];

ald.SetShadowAlgorithm( (int) shadowAlgorithm, (int) shadowVariant, (int) shadowPrecision, (int) packedAlgo, shadowData );
UnityEditor.EditorGUI.indentLevel--;
#endif
}
public void SetGlobalShadowOverride( GPUShadowType shadowType, ShadowAlgorithm shadowAlgorithm, ShadowVariant shadowVariant, ShadowPrecision shadowPrecision, bool enable )

正在加载...
取消
保存