AssetsOnlyAttribute does nothing when with TableMatrixAttribute

Issue #912 resolved
Benoît Dubreuil created an issue

What happened?

I decorated a public instance variable with the attribute AssetsOnlyAttribute. This instance variable was already decorated with the attribute TableMatrix. I assigned a scene GameObject to a cell in the matrix and there were no warning that it was not allowed.

How can we reproduce it?

using Sirenix.OdinInspector;
using UnityEngine;

public class MatrixTest : SerializedMonoBehaviour
{
    [Required]
    [AssetsOnly]
    [TableMatrix(SquareCells = true)]
    public GameObject[,] Assets = new GameObject[2, 2];
}

If screenshots would help explain or demonstrate your issue, please include these.

What version of Unity are you using?

Unity version 2021.3.20f1

What version of Odin are you using?

Odin version 3.1.10.0

Do you have Editor Only mode enabled?

No

What operating system are you on?

Windows 10

Comments (1)

  1. Log in to comment