Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9137895
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T09:11:10+00:00 2026-06-17T09:11:10+00:00

I’m trying to show a two-dimensional array in the editor like the Layer Collision

  • 0

I’m trying to show a two-dimensional array in the editor like the “Layer Collision Matrix” is shown in Unity:
enter image description here

Though instead of checkboxes I need ints, and a full grid (not the triangle shape.) I can’t seem to figure out how to do this though… I can get a custom editor, though making the grid fails. So, is there any way I can see the code of the Physics Manager’s editor (the Layer Collision Matrix is in there) or maybe someone knows a good way to do this?

Note: Preferred language is c#, though any will do.

Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T09:11:11+00:00Added an answer on June 17, 2026 at 9:11 am

    The code involved in what you’re looking for is pretty complex, so I’m going to rely on you to know what I’m talking about here. The Unity docs are your friend.

    1. Create a GUIArea where your special editor tool will be. Inside it, place a
      function call that will then call the other rendering functions. I
      suspect you’ll want to do some encapsulation here. Encapsulating the gui in another function will allow you to duplicate its functionality (within the limits of your abstraction) and move things around on screen more easily.

    2. Design three anchor points (Vector2). They should each represent the top-left
      coord of your row labels, column labels, and data field. Note that
      the columns anchor needs to be directly above (same x-value as) the
      row anchor, since rotating (next step) will transform the anchor.

    3. Use GUIUtility.RotateAroundPivot() to rotate the GUI transform
      matrix by 90° around the column anchor point.

    4. Write a long GUI.Label (or several of them) for your labels.
      Anchor them at the column anchor. Per the image above, your label
      string could read something like
      “Default\nTransparentFX\nIgnoreRaycast\nWater” where the \n creates
      a newline.

    5. Rotate again, -90° back to the original matrix. Alternatively, you
      can copy GUI.matrix prior to step 3, then assign it back for a
      guaranteed matrix reset. Rotating back and forth may have some error due to floating-point and other imprecision.

    6. Write labels for the rows. Same method as two steps back. Anchor
      them at the row anchor.

    7. This is the harder part. Iterate through your data field, creating a
      small EditorGUI.IntField() or StringField() or even
      ObjectField() for each element in your data. Each element will
      need its own anchor, which is then summed with the data field anchor.
      If your data field is a square 2D array, deriving the anchors will
      be easy – though you’ll also have empty elements in your array (if
      you want the exact functionality described above). If you want to
      conserve memory, you’ll have to transform the element indexes into
      coordinates using some tricky math. I’m not sure off the top of my
      head how I’d do it.

    Hope I’m not forgetting anything. Unity’s GUI is a b—-. Comment and I’ll do my best to help you.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to render a haml file in a javascript response like so:
I'm trying to convert HTML to plain text. I get many &\#8217; &\#8220; etc.
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I am trying to understand how to use SyndicationItem to display feed which is
Basically, what I'm trying to create is a page of div tags, each has
link Im having trouble converting the html entites into html characters, (&# 8217;) i
For some reason, after submitting a string like this Jack’s Spindle from a text
I am trying to find ID3V2 tags from MP3 file using jid3lib in Java.
I am confused How to use looping for Json response Array in another Array.
I've got a string that has curly quotes in it. I'd like to replace

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.