Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

327
Views
¿Puedo eliminar este gran espacio cuando uso EditorGUILayout.PropertyField?

Me estoy metiendo en Editor Scripting en Unity y rápidamente me sorprende todo este asunto de SerializedProperty. Todo lo que estoy tratando de hacer es hacer que esta casilla de verificación Sensible a mayúsculas y minúsculas se pegue a la derecha del inspector sin todo ese espacio entre el texto y el cuadro en sí, dejando suficiente espacio para TextField.

Esto es lo que estoy haciendo actualmente:

 using (new EditorGUILayout.HorizontalScope()) { GUILayout.Label("Search for:", GUILayout.Width(64)); searchText = GUILayout.TextField(searchText); EditorGUILayout.PropertyField(propCaseSensitive, GUILayout.MinWidth(0), GUILayout.ExpandWidth(false)); }

esto es lo que obtengo

Probé GUILayout.Width y GUILayout.MaxWidth y GUILayout.ExpandWidth (falso) combinados con GUILayout.MinWidth (y también solos)

Ninguno de los cuales ha funcionado, he estado atascado tratando de hacer que este simple script funcione durante demasiado tiempo para admitirlo y me está volviendo loco. Por favor ayúdame, gracias :)

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

Creo que puedes hacerlo similar a tu otra etiqueta.

PropertyField tiene una sobrecarga al tomar GUIContent label . Al pasar GUIContent.none , omite la etiqueta y, en su lugar, puede agregar la suya propia:

 // Not sure if even needed but adjust to the width you need EditorGUILayout.LabelField(propCaseSensitive.displayName, GUILayout.Width(64), GUILayout.ExpandWidth(false)); // Don't draw the name via the default property field layout EditorGUILayout.PropertyField(propCaseSensitive, GUIContent.none, GUILayout.ExpandWidth(false));
over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!