compiler error - playmode
Hallo,
ich bin neu in der Unity-Umgebung und habe mir ein Free-Asset runtergeladen. Danach hat er die API geupdatet und nun geht nichts mehr: "All compiler Errors have to be fixed before you can enter playmode"
3 Fehler:
(1) Assets/Editor/ImageEffects/CreaseShadingEditor.cs(8,26): error CS0122:
UnityStandardAssets.ImageEffects.CreaseShading' is inaccessible due to its protection level`
(2) Assets/Editor/ImageEffects/CreaseShadingEditor.cs(8,6): error CS1502: The best overloaded method match for
UnityEditor.CustomEditor.CustomEditor(System.Type)' has some invalid arguments`
(3) Assets/Editor/ImageEffects/CreaseShadingEditor.cs(8,6): error CS1503: Argument
#1' cannot convert object' expression to type
System.Type'`
der code im creaseshadingeditor ist folgender:
using System;
using UnityEditor;
using UnityEditor.AnimatedValues;
using UnityEngine;
namespace UnityStandardAssets.ImageEffects
{
[CustomEditor(typeof(CreaseShading))]
class CreaseShadingEditor : Editor {
SerializedObject serObj;
SerializedProperty m_intensity;
SerializedProperty m_softness;
SerializedProperty m_spread;
AnimBool m_showSoftnessWarning = new AnimBool();
AnimBool m_showSpreadWarning = new AnimBool();
private bool softnessWarningValue { get { return m_softness.intValue > 4; } }
private bool spreadWarningValue { get { return m_spread.floatValue > 4; } }
public void OnEnable () {
serObj = new SerializedObject (target);
m_intensity = serObj.FindProperty("intensity");
m_softness = serObj.FindProperty("softness");
m_spread = serObj.FindProperty("spread");
m_showSoftnessWarning.valueChanged.AddListener(Repaint);
m_showSpreadWarning.valueChanged.AddListener(Repaint);
m_showSoftnessWarning.value = softnessWarningValue;
m_showSpreadWarning.value = spreadWarningValue;
}
public override void OnInspectorGUI () {
serObj.Update ();
EditorGUILayout.Slider(m_intensity, -5.0f, 5.0f, new GUIContent("Intensity"));
EditorGUILayout.IntSlider(m_softness, 0, 15, new GUIContent("Softness"));
m_showSoftnessWarning.target = softnessWarningValue;
if (EditorGUILayout.BeginFadeGroup(m_showSoftnessWarning.faded))
{
EditorGUILayout.HelpBox("High Softness value might reduce performance.", MessageType.Warning, false);
}
EditorGUILayout.EndFadeGroup();
EditorGUILayout.Slider(m_spread, 0.0f, 50.0f, new GUIContent("Spread"));
m_showSpreadWarning.target = spreadWarningValue;
if (EditorGUILayout.BeginFadeGroup(m_showSpreadWarning.faded))
{
EditorGUILayout.HelpBox("High Spread value might introduce visual artifacts.", MessageType.Warning, false);
}
EditorGUILayout.EndFadeGroup();
serObj.ApplyModifiedProperties ();
}
}
}
Bin dankbar für jede hilfe. LG
Your answer
Follow this Question
Related Questions
CS1023 An embedded statement may not be a declaration or labeled statement help 1 Answer
NULL REFERENCE DRVING ME INSANE!!! HELP!!!! 1 Answer
Unexpected symbol error in shader script 0 Answers
Compiler won't execute after upgrading from 5.5 to the 5.6 beta 0 Answers
I got three CS 1061 Errors while learning Unity as an absolute beginner. Please help me! 1 Answer