Thank you for submitting your inquiry.
You can track the status of your inquiry here.
You may want to save your case's ticket: 947428_63j0ogjjrdnlsjm1


    (Closed) ObjectFields, for Texture2D objects, in a property drawer- does not display consistantly
     
     
     
    5
    ObjectFields, for Texture2D objects, in a property drawer- does not display consistantly

    1. What happened

    This Question on Unity answer contains more details about this issue: http://answers.unity3d.com/questions/1311926/texture2d-in-scriptableobjects-property-drawer-exp.html
    (The question got some responses, even from the masterful Bunny83, but alas, no resolution)

    Basically, it does not KEEP the selected texture displayed on the screen.  Even though the control itself i always displayed, the texture inside it appears and disapears when various mouse events are recieved.  A simple EditorGUI.ObjectFiled(....typeof(Texture2d)...) call, inside the object's PropertyDrawer is all I use to display the control.  (see TexTestPropertyDrawer.cs for a simple exmple)


    2. How we can reproduce it using the example you attached

    Open the sample Scene in the attached project, and select either the "TestObject" Or "VerySimpleTestObject".  Notice that the inspector does not cosistantly display the selected textures.  By moving and clicking around on the sreen, one can make them appear properly, or appear "blank".

    I have included in this sample project, 3 types of objects containing Texture2D, to make sure it wasn't a serialization issue,  one if a ScriptableObject, and two are serializable objects, containing a Texture2D in a custom class.

    3.  You can RESOLVE the issue, by addinging a do-nothing-editor class to the system, for any monobehavior containing our customTexture2d-containing object.  (remove the remarks in the MonoTextEditor file, or MonoTextureTestEditor file, to see this in work-around in action).
     
       
      To follow up on this case, send email to accounts@unity3d.com mentioning 'Case 947428' in the subject.
      Your Cases:
      Case Title Status Date Opened
      1318760 Apparent Memory leak in HDRP Closed 3/3/2021 12:26 AM
      1189404 Apllication.isPlaying returns false in [InitializeOnLoad] function, AFTER hitting play, in the editor Closed 10/6/2019 6:55 PM
      1188507 Using MaterialPropertyBlock on a MeshRenderer, and then adding materials to MeshRenderer causes crash Closed 10/2/2019 6:39 PM
      979796 when using ExecureInEditMode: OnEnable() is called BEFORE Reset Closed 12/18/2017 9:00 PM
      974979 Cannot set texture to null using MaterialPropertyBlock.SetTexture Closed 12/2/2017 10:40 PM
      968044 Should not be capturing when there is a hotcontrol Closed 11/11/2017 6:30 PM
      963576 Objects using HideAndDontSave, after being disbled, an enabled, are visible in previews Closed 10/29/2017 12:10 AM
      961878 SerializedProperty version of ObjectField functions ignoring parameter Closed 10/24/2017 12:10 AM
      947428 ObjectFields, for Texture2D objects, in a property drawer- does not display consistantly Closed 9/1/2017 6:40 PM
      945452 EditorGUI.indent affects property height Closed 8/25/2017 10:00 PM
      914028 model previews do not update properly and mesh selection screen displays wrong shapes Closed 5/23/2017 9:40 PM
      768973 ArgumentExceptions Generated By Editor when using custom PropertyDrawer Closed 2/9/2016 1:28 AM