You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In WaterSurfaceDataEditor.cs,the code waveOrig.vector2Value = EditorGUI.Vector2Field(dirRect, "Point of Origin", waveOrig.vector2Value); shows error if I call it.
Mismatched types in GetValue - return value is junk
UnityEditor.SerializedProperty:get_vector2Value ()
WaterSystem.Data.WaterSurfaceDataEditor/<>c__DisplayClass1_0:<OnValidate>b__0 (UnityEngine.Rect,int,bool,bool) (at Assets/GameMain/3rdParty/com.verasl.water-system/Editor/WaterSurfaceDataEditor.cs:71)
UnityEditorInternal.ReorderableList:DoListElements (UnityEngine.Rect,UnityEngine.Rect)
UnityEditorInternal.ReorderableList:DoLayoutList ()
WaterSystem.Data.WaterSurfaceDataEditor:OnInspectorGUI () (at Assets/GameMain/3rdParty/com.verasl.water-system/Editor/WaterSurfaceDataEditor.cs:236)
WaterSystem.WaterEditor:OnInspectorGUI () (at Assets/GameMain/3rdParty/com.verasl.water-system/Editor/WaterEditor.cs:29)
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)
public static class SerializedPropertyExtensions
{
public static Vector2 GetFloat2AsVector(this SerializedProperty property)
{
Vector2 output;
var p = property.Copy();
p.Next(true);
output.x = p.floatValue;
p.Next(true);
output.y = p.floatValue;
return output;
}
public static void SetFloat2FromVector(this SerializedProperty property, Vector2 value)
{
var p = property.Copy();
p.Next(true);
p.floatValue = value.x;
p.Next(true);
p.floatValue = value.y;
}
}
And then replace Vector2Field property with function from the class.
Although there is another problem with Omnidirectional wave too try not to choose that type for waves.
In WaterSurfaceDataEditor.cs,the code
waveOrig.vector2Value = EditorGUI.Vector2Field(dirRect, "Point of Origin", waveOrig.vector2Value);
shows error if I call it.And even I comment it, there is nothing showing on the board if I click Customized button, Any help?
The text was updated successfully, but these errors were encountered: