Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

SkinWidth Parameter of a character controller inaccessible

Discussion in 'Editor & General Support' started by jerome, Feb 17, 2009.

  1. jerome

    jerome

    Joined:
    Oct 13, 2008
    Posts:
    53
    Hello

    I am trying to build a charachter on the fly and add some component.
    And I have a problem when adding a charachter controller. I can add it modify all parameters execpt the "skinWidth" parameters which is accessible through the interface of the component in unity editor. In the documenttion this parameters is not mentoined too...
    So it is posible to change this parameters througt scripting or not ? Its look strange that we can't !

    Thank you

    Jérome
     
  2. jerome

    jerome

    Joined:
    Oct 13, 2008
    Posts:
    53
    Any information why this parameter is not available in script ?
     
  3. fellipeml

    fellipeml

    Joined:
    May 12, 2009
    Posts:
    74
    *mistery*
     
  4. Antitheory

    Antitheory

    Joined:
    Nov 14, 2010
    Posts:
    549
    There needs to be a "complaints" forum or something. I also have a real need to adjust the skinWidth of a previously created CharacterController. It's obviously trivial to implement this as I can edit the value in the inspector while the game is running without problems. Information (variables) wants to be free (public).
     
  5. pedroluchini

    pedroluchini

    Joined:
    Jun 12, 2011
    Posts:
    9
    Any news on this?

    If the inspector can view and modify the skin width at run-time, then there's no reason we shouldn't be able to do that too. I'm trying to cheat my way through this problem by using C# reflection, and while I did manage to find some hidden goodies the skinWidth property still eludes me. :(

    Code (csharp):
    1. Type t = typeof(CharacterController);
    2. System.Reflection.MemberInfo[] fields = t.GetMembers();
    3. foreach (System.Reflection.MemberInfo field in fields)
    4.     Debug.Log(field.Name + " (" + field.MemberType + ")");
    Code (csharp):
    1. SimpleMove (Method)
    2. Move (Method)
    3. get_isGrounded (Method)
    4. get_velocity (Method)
    5. get_collisionFlags (Method)
    6. get_radius (Method)
    7. set_radius (Method)
    8. get_height (Method)
    9. set_height (Method)
    10. get_center (Method)
    11. set_center (Method)
    12. get_slopeLimit (Method)
    13. set_slopeLimit (Method)
    14. get_stepOffset (Method)
    15. set_stepOffset (Method)
    16. get_detectCollisions (Method)
    17. set_detectCollisions (Method)
    18. get_attachedRigidbody (Method)
    19. get_isTrigger (Method)
    20. set_isTrigger (Method)
    21. get_material (Method)
    22. set_material (Method)
    23. ClosestPointOnBounds (Method)
    24. get_sharedMaterial (Method)
    25. set_sharedMaterial (Method)
    26. get_bounds (Method)
    27. Raycast (Method)
    28. get_transform (Method)
    29. get_rigidbody (Method)
    30. get_camera (Method)
    31. get_light (Method)
    32. get_animation (Method)
    33. get_constantForce (Method)
    34. get_renderer (Method)
    35. get_audio (Method)
    36. get_guiText (Method)
    37. get_networkView (Method)
    38. get_guiElement (Method)
    39. get_guiTexture (Method)
    40. get_collider (Method)
    41. get_hingeJoint (Method)
    42. get_particleEmitter (Method)
    43. get_gameObject (Method)
    44. GetComponent (Method)
    45. GetComponent (Method)
    46. GetComponent (Method)
    47. GetComponentInChildren (Method)
    48. GetComponentInChildren (Method)
    49. GetComponentsInChildren (Method)
    50. GetComponentsInChildren (Method)
    51. GetComponentsInChildren (Method)
    52. GetComponentsInChildren (Method)
    53. GetComponents (Method)
    54. GetComponents (Method)
    55. get_active (Method)
    56. set_active (Method)
    57. get_tag (Method)
    58. set_tag (Method)
    59. CompareTag (Method)
    60. SendMessageUpwards (Method)
    61. SendMessageUpwards (Method)
    62. SendMessageUpwards (Method)
    63. SendMessageUpwards (Method)
    64. SendMessage (Method)
    65. SendMessage (Method)
    66. SendMessage (Method)
    67. SendMessage (Method)
    68. BroadcastMessage (Method)
    69. BroadcastMessage (Method)
    70. BroadcastMessage (Method)
    71. BroadcastMessage (Method)
    72. Equals (Method)
    73. GetHashCode (Method)
    74. GetInstanceID (Method)
    75. get_name (Method)
    76. set_name (Method)
    77. get_hideFlags (Method)
    78. set_hideFlags (Method)
    79. ToString (Method)
    80. GetType (Method)
    81. .ctor (Constructor)
    82. isGrounded (Property)
    83. velocity (Property)
    84. collisionFlags (Property)
    85. radius (Property)
    86. height (Property)
    87. center (Property)
    88. slopeLimit (Property)
    89. stepOffset (Property)
    90. detectCollisions (Property)
    91. attachedRigidbody (Property)
    92. isTrigger (Property)
    93. material (Property)
    94. sharedMaterial (Property)
    95. bounds (Property)
    96. transform (Property)
    97. rigidbody (Property)
    98. camera (Property)
    99. light (Property)
    100. animation (Property)
    101. constantForce (Property)
    102. renderer (Property)
    103. audio (Property)
    104. guiText (Property)
    105. networkView (Property)
    106. guiElement (Property)
    107. guiTexture (Property)
    108. collider (Property)
    109. hingeJoint (Property)
    110. particleEmitter (Property)
    111. gameObject (Property)
    112. active (Property)
    113. tag (Property)
    114. name (Property)
    115. hideFlags (Property)
    116.  
     
  6. Grazer2

    Grazer2

    Joined:
    Jun 20, 2011
    Posts:
    82
    Bump. Why do there always have to be limitations like that? Please get this property exposed, dear unity team.
     
  7. pedroluchini

    pedroluchini

    Joined:
    Jun 12, 2011
    Posts:
    9
  8. GarthSmith

    GarthSmith

    Joined:
    Apr 26, 2012
    Posts:
    1,240
    Anyone found how to access this from script yet? If not, I'm going to make a ticket at feedback.unity3d.com tomorrow.
     
  9. SpiralConDave

    SpiralConDave

    Joined:
    Dec 29, 2014
    Posts:
    37
    Unity5 and the problem persists
     
  10. cakeslice

    cakeslice

    Joined:
    Oct 18, 2014
    Posts:
    197
    Come on Unity devs... this takes a minute to fix...
     
  11. VesuvianPrime

    VesuvianPrime

    Joined:
    Feb 26, 2013
    Posts:
    135
    I, too, am trying to see if I can access the skin width programatically.

    Using .NET Reflector I can see that the inspector code references the serialized properties:


    So we can infer that CharacterController has a private field called "m_SkinWidth". However, at runtime I'm only finding the following fields (private or otherwise):



    This is really hurting my head. How do these members suddenly disappear at runtime?
     
  12. rstorm000

    rstorm000

    Joined:
    Aug 19, 2010
    Posts:
    228
    also looking for now
     
  13. Stankiem

    Stankiem

    Joined:
    Dec 4, 2013
    Posts:
    115
    Any progress on this?
     
  14. Neyl

    Neyl

    Joined:
    Feb 3, 2011
    Posts:
    18
    It should be awailable in 5.2
     
  15. SpiralConDave

    SpiralConDave

    Joined:
    Dec 29, 2014
    Posts:
    37
    Glad to hear. Now, can you please also expose params on other scripts, like the FPS controller and MouseLook, where they are set to Private? Can't override them nicely.