1. I need a little help fixing "parameters do not match signature". Looking at other fixes:

    I've tried changing

    local arg = util.TableToArray({player.eyes:HeadRay()})
    to

    local position = player.transform.position
    local arg = util.TableToArray({position, UnityEngine.Vector3.get_forward()})

    which resolves the error, but the loop no longer finds the building the players is looking at. I suspect the problem is with the get_forward?

    Thanks.
     
  2. Wulf

    Wulf Community Admin

    The problem is with the methodarray you were using before, which was changed in the Unity 5.2 update. They added/changed some, so you'd need to loop through it to find the correct one.
     
  3. Thank you. Hate to ask, could you please provide an example or anything willing. The solution still evades me despite what I have tried.
     
  4. Wulf

    Wulf Community Admin

    @Mughisi would be the one to ask, I'm not that familiar with it.
     
  5. Thanks. Hopefully he chimes in. :)
     
  6. I'd need to know which method you are trying to use.
     
  7. This is what I was using:
    Code:
    local arg = util.TableToArray({player.eyes:HeadRay()})
    local hits = UnityEngine.Physics.RaycastAll["methodarray"][1]:Invoke(nil,arg)
    local it = hits:GetEnumerator()
    while it:MoveNext() do
       if it.Current.collider:GetComponentInParent(global.BuildingBlock._type) then
         local buildingblock = it.Current.collider:GetComponentInParent(global.BuildingBlock._type)
         if buildingblock then
           do stuff
         end
       end
    end
     
  8. Switch out the methodarray index 1 for index 2
    Code:
    UnityEngine.Physics.RaycastAll["methodarray"][2]
    With the update to Unity 5.2 a few extra RaycastAll methods were added so the indexes of the array have changed a bit.
     
  9. Thank you, Mughisi, as always. :) While on this subject, would you be able to assist me in my other topic with getting code lock code/owner of door? Thanks.
     
    Last edited by a moderator: Sep 21, 2015