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

ConditionalField hide values of a Serializable Class on my inspector #61

Closed
RobertoGlez opened this issue Feb 22, 2020 · 2 comments
Closed

Comments

@RobertoGlez
Copy link

This is my code
[ConditionalField("NeedRotation")] public RotationCore Rotation;

And NeedRotation is a bool value, but when is it activated,it show me the class, but do not show me values of the same class, and without this conditional i can see the values without problems, my class have a [System.Serializable] on the top

@Deadcows
Copy link
Owner

Oh my, how did I missed that! Sorry for the late response!

I tried to reproduce the issue:

public class Test : MonoBehaviour
{
  public bool A;
  [ConditionalField(nameof(A))] public TestStruct TTest;
}

[Serializable]
public struct TestStruct
{
  public string A;
  public int B;
}

it works as intended:
image

Do you have custom drawer for RotationCore or some other specifics that differ your case from my test?

@Deadcows
Copy link
Owner

Deadcows commented May 6, 2020

I'll close it for now, will reopen if problem remains. I'm working on the remake of ConditionalField anyway

@Deadcows Deadcows closed this as completed May 6, 2020
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

2 participants