Skip to content

[Editor] MaterialsVariantsComponent's dropdown doesn't initialize to the current value #47

@anonymous2585

Description

@anonymous2585

Describe the bug
When using a MaterialsVariantsComponent, unselecting the GameObject and re-selecting it clears the value displayed in the inspector.

To Reproduce
Steps to reproduce the behavior:

  1. Add a Multiple Instance script on a GameObject, with url set to a glTF file using the "KHR_materials_variants" extension and Quantity set to 1.
  2. Press Play
  3. Select the created object "glTF-0"
  4. In the Materials Variants Component, change the dropdown to one of the variant of your model
  5. Unselect the GameObject
  6. Re-select the GameObject
  7. See MaterialsVariantsComponent displaying <no variant>

Expected behavior
The variant dropdown displays the variant selected at step 5.

Desktop (please complete the following information):

  • glTFast version 6.18.0
  • Unity Editor version 6000.3.12f1
  • Platform: Editor

Note: I didn't update the [Unreleased] section of the changelog since the main branch here is not up to date with version 6.18.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions