Search Unity

Rely UI Images by line in the scene

Discussion in 'Scripting' started by rimiki, Aug 28, 2015.

  1. rimiki

    rimiki

    Joined:
    Dec 30, 2014
    Posts:
    102
    I'm working on a project in which I have images in the scene and I would like to rely between them with a row or line maybe or any other.
    I don't know if there is a solution to do that.
    Thank you.
     
  2. GroZZleR

    GroZZleR

    Joined:
    Feb 1, 2015
    Posts:
    3,201
    I think there's a language barrier with your question. Rely in English means to depend on something, and I doubt you want to depend on something in a row or line.

    Could you try rephrasing?
     
  3. rimiki

    rimiki

    Joined:
    Dec 30, 2014
    Posts:
    102
    Thank for your reply, yes I want that line could rely between the images.
    For example if I have 2 images and I rely between them they come one thing attached.
    Hope I'm more clear with my explanation.
    After that I would go more far a way with that, in order to draw a hierarchy of relation when I rely in which it is realized in the background of the application..
     
  4. rimiki

    rimiki

    Joined:
    Dec 30, 2014
    Posts:
    102
  5. rimiki

    rimiki

    Joined:
    Dec 30, 2014
    Posts:
    102
    I find out this description of handles and the image illustrate well waht I wanna do:
    http://docs.unity3d.com/ScriptReference/Handles.DrawLine.html
    Using the code:

    // Draw lines to the connected game objects that a script has.
    // if the target object doesnt have any game objects attached
    // then it draws a line from the object to 0,0,0.

    @CustomEditor (ConnectedObjects)
    class ConnectLineHandle extends Editor {

    function OnSceneGUI () {
    for(var i = 0; i < target.objs.Length; i++)
    if(target.objs)
    Handles.DrawLine(target.transform.position,
    target.objs.transform.position);
    else
    Handles.DrawLine(target.transform.position, Vector3.zero);
    }
    }

    Unity generate many errors

    Does any body have any solutions for that ?.!