8000 Selecting the parent object · Issue #3 · GieziJo/ScriptableObjectVariant · GitHub
[go: up one dir, main page]

Skip to content

Selecting the parent object #3

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

Open
GieziJo opened this issue Mar 23, 2021 · 0 comments
Open

Selecting the parent object #3

GieziJo opened this issue Mar 23, 2021 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@GieziJo
Copy link
Owner
GieziJo commented Mar 23, 2021

The selected parent should be of the exact same class as the overriden item (otherwise fields might be missing) and should not be the child itself.
This check is currently done when setting the parent as:

if (parent.GetType() != target.GetType())
{
   Debug.Log("Only equal types can be selected as parent");
   return;
}

if (AssetDatabase.GetAssetPath(parent) == AssetDatabase.GetAssetPath(target))
{
   Debug.Log("You can't select the same object as parent");
   return;
}

It would be alot better to directly filter the possible candidates when selecting in the object, but adding the AssetSelector attribute with a filter, or building a custom ValueDropdown both did not work, not sure why.

@GieziJo GieziJo added the enhancement New feature or request label Mar 23, 2021
@GieziJo GieziJo self-assigned this Mar 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant
0