Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't Build with the MinMaxSlider #2

Open
dfarjoun opened this issue Jul 7, 2020 · 5 comments
Open

Can't Build with the MinMaxSlider #2

dfarjoun opened this issue Jul 7, 2020 · 5 comments

Comments

@dfarjoun
Copy link

dfarjoun commented Jul 7, 2020

Hi,

This is an amazing solutions for my needs, but I can't Build the project.

It was all working great inside the editor, but when I tried to export I got these errors:

Library/PackageCache/com.guciodevs.simple-min-max-slider@46ff35d229/Scripts/MinMaxSliderAttribute.cs(6,18): error CS0509: 'MinMaxSliderAttribute': cannot derive from sealed type 'PropertyAttributes'

Error building Player because scripts have compile errors in the editor

Build completed with a result of 'Failed' in 3 seconds (3102 ms)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr) (at /Users/builduser/buildslave/unity/build/Modules/IMGUI/GUIUtility.cs:197)

Can you help solve this issue?

@iisakovAG
Copy link

Having the same issue in Unity 2019.4.1f1

Adamcbrz added a commit to Adamcbrz/SimpleMinMaxSlider that referenced this issue Sep 25, 2020
@WoutStandaert
Copy link

WoutStandaert commented Jul 1, 2021

Issue still seems to exist in Unity 2021.1.7f1:

Library\PackageCache\com.guciodevs.simple-min-max-slider@46ff35d\Scripts\Editor\MinMaxSliderDrawer.cs(6,35): error CS0246: The type or namespace name 'PropertyDrawer' could not be found (are you missing a using directive or an assembly reference?)

Library\PackageCache\com.guciodevs.simple-min-max-slider@46ff35d\Scripts\Editor\MinMaxSliderDrawer.cs(5,2): error CS0246: The type or namespace name 'CustomPropertyDrawerAttribute' could not be found (are you missing a using directive or an assembly reference?)

Library\PackageCache\com.guciodevs.simple-min-max-slider@46ff35d\Scripts\Editor\MinMaxSliderDrawer.cs(5,2): error CS0246: The type or namespace name 'CustomPropertyDrawer' could not be found (are you missing a using directive or an assembly reference?)

Library\PackageCache\com.guciodevs.simple-min-max-slider@46ff35d\Scripts\Editor\MinMaxSliderDrawer.cs(8,47): error CS0246: The type or namespace name 'SerializedProperty' could not be found (are you missing a using directive or an assembly reference?)

I solved this by using the UnityPackage instead of the UPM github link, and then had to manually move "MinMaxSliderDrawer.cs" to the Editor folder in the root of my project.

@TylerTemp
Copy link

Same on Unity 2021:

Library/PackageCache/com.guciodevs.simple-min-max-slider@46ff35d229/Scripts/Editor/MinMaxSliderDrawer.cs(6,35): error CS0246: The type or namespace name 'PropertyDrawer' could not be found (are you missing a using directive or an assembly reference?)
Library/PackageCache/com.guciodevs.simple-min-max-slider@46ff35d229/Scripts/Editor/MinMaxSliderDrawer.cs(5,2): error CS0246: The type or namespace name 'CustomPropertyDrawerAttribute' could not be found (are you missing a using directive or an assembly reference?)
Library/PackageCache/com.guciodevs.simple-min-max-slider@46ff35d229/Scripts/Editor/MinMaxSliderDrawer.cs(5,2): error CS0246: The type or namespace name 'CustomPropertyDrawer' could not be found (are you missing a using directive or an assembly reference?)
Library/PackageCache/com.guciodevs.simple-min-max-slider@46ff35d229/Scripts/Editor/MinMaxSliderDrawer.cs(8,47): error CS0246: The type or namespace name 'SerializedProperty' could not be found (are you missing a using directive or an assembly reference?)

@Adamcbrz
Copy link

@TylerTemp @WoutStandaert I forked the repo and fixed this issue last year but the pullrequest has not been implemented. I think the owner of this repo is not monitoring any more. Feel free to use my repo instead. https://github.com/Adamcbrz/SimpleMinMaxSlider

The issue is tha all those API's are Editor only and won't be avaiailbe in a build. They need to be wrapped in a UNITY_EDITOR preprocess directive.

@pvl30
Copy link

pvl30 commented Jul 29, 2022

Thanks, it works!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants