Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

[RELEASED] 2D ColliderGen - Generate Precise Polygon Colliders For Your 2D Sprites

Discussion in 'Assets and Asset Store' started by Pixelcloud-Games, Mar 14, 2013.

  1. Pixelcloud-Games

    Pixelcloud-Games

    Joined:
    Apr 29, 2011
    Posts:
    160
    Since I'm on Holidays from 7th to 22nd of September, I have to post this a bit ahead of time:

    $update_1.2_website_news.png

    2D ColliderGen v1.2 has been submitted for review and will (hopefully) be released very soon on the Asset store!
    The most important big new feature is the support for unlimited collider-island and –hole regions within a single texture image!

    $screen7_holes_and_islands.png

    Hope you like it! :)

    If you have any questions in the meantime, please be a litte patient since I have no internet-connection in the following two weeks. I will however get back to you asap thereafter!

    Cheers,
    Harald


    The full Changelog comes here:

    New Features:
    • Added support for unlimited collider-island and –hole
      regions
      within a single texture image. Islands and holes
      can be enabled and configured via a new
      'Holes and Islands' section.
    • Added support for OTTilesSprite. Simply add an
      AlphaMeshCollider to a GameObject with an OTTilesSprite
      component to generate colliders for it.
    • Added a "Custom Texture Region" section to the
      AlphaMeshCollider parameters where you can specify a
      custom region to be used for collider computations
      (e.g. to use a custom frame from a texture atlas or
      spritesheet).
    Bugfixes:
    • SmoothMoves related:
      • Collider scale was wrong when setting a custom image at a
        generic object (e.g. a plain quad) which had no
        SmoothMoves or Orthello sprite attached.
      • Colliders attached to SmoothMoves BoneAnimation
        sprites can now scale along with it. Added an
        AlphaMeshCollider toggle parameter
        "SmoothMoves Scale Anim" to enable this behaviour.
    • 2D Toolkit related:
      • Changed the location of the ColliderGenTK2DParameterStore
        code file from Editor to Scripts directory. This prevents
        a problem that occurred with later versions of the Mono
        Compiler. Unfortunately, all ColliderGenParameters.prefab
        files that stored parameters for convenience of each
        sprite in a collection are no longer compatible and will
        be treated as non-existent.
     
  2. Pixelcloud-Games

    Pixelcloud-Games

    Joined:
    Apr 29, 2011
    Posts:
    160
    Just in case you haven't read the above post:

    I'm on holiday from 7th to 22nd of September. So if you have any questions in the meantime, please be a litte patient since I have no internet-connection in these two weeks. I will however get back to you asap thereafter! :)

    Cheers,
    Harald
     
  3. u9924032

    u9924032

    Joined:
    Sep 8, 2013
    Posts:
    6
    Hello, I bought your ColliderGen today, very nice.
    But I have some problem below:
    1.How create alpha mesh colliders in Vectorsity(unity asset from asset store)
    2.How dynamically create alpha mesh colliders in runtime.(Although I read previous posts in this threaded, and I tried to understand, but I can't.)
    Thanks a lot!
     
  4. atmuc

    atmuc

    Joined:
    Feb 28, 2011
    Posts:
    1,148
    Pixelcloud Games have you watched unity 4.3 2d videos? unity 4.3 looks it does this type of collider. does your package has more advantages?
     
  5. Pixelcloud-Games

    Pixelcloud-Games

    Joined:
    Apr 29, 2011
    Posts:
    160
    Hi!

    Finally back from my holidays, thanks for your patience in the meantime everyone!
    Thanks very much for purchasing our tool!
    I'll provide some step by step instructions on your topics, just need some time to write this all down :).
     
  6. Pixelcloud-Games

    Pixelcloud-Games

    Joined:
    Apr 29, 2011
    Posts:
    160
    Hi atmuc,

    Thanks for pointing this out, yes, I have watched the videos. From what I have seen in the videos it's that Unity's 4.3's 2D collider generation comes with a smaller feature-set than 2D ColliderGen and some major limitations in some regions:
    You'll very likely be limited to Unity's new built-in sprites in order to be able to attach the built-in colliders to them, so if you have a project which uses Orthello, 2D Toolkit or SmoothMoves already it will be quite unlikely to work. Especially if you are using SmoothMoves I bet 1000$ it will not work to attach colliders to bone-animated characters, since there are some custom steps involved. Similar with 2D Toolkit and Orthello. So if you are using any of these packages already, I bet they won't be supported.
    Apart from compatibility, the featureset of 2D ColliderGen provides more features, such as the following:
    You can specify an exact vertex count of your collider, even for each single collider region, with infinite 'collider-island' and '-hole' regions per sprite image. 2D ColliderGen also provides a 'concave' switch which turns your collider concave instantly.
    You can also provide a custom image to compute the collider from - so you can attach our collider-generation script to anything (3D models, empty game object nodes, particle nodes, etc) and set a custom collision-image - et voila, instant collisions.
    You also have many more customization features like scale, offset, custom regions, multi-object-tweaking, etc.
    And with 2D ColliderGen, you can even create colliders at runtime (for now there's some coding involved as stated, but I'll help everyone with that)!
     
    Last edited: Sep 23, 2013
  7. Pixelcloud-Games

    Pixelcloud-Games

    Joined:
    Apr 29, 2011
    Posts:
    160
    Hi everyone,

    2D ColliderGen is today's Daily Deal at -75% (only 7,5$ instead of 30$)!
    If you don't already know, it officially supports the 2D Toolkit, Smoothmoves and Orthello frameworks to automatically generate polygon colliders for your sprites at the click of a button!

    Give it a chance now or live with regret ;)

    View attachment 68346

    Short Trailer:


    Visit the Asset Store page: [link]
    Website with Documentation and Video tutorials: [link]

    And thanks so much to all who have already happily purchased the tool! Big Thanks to you guys! :)
    Cheers, Harald
     
  8. atmuc

    atmuc

    Joined:
    Feb 28, 2011
    Posts:
    1,148
    i agree with integrations with 2dtoolkit and smoothmoves. now i use 2dtoolkit. i plan to use unity 2d system. i believe i will have some advantages like 2d physics, 2d collider types, animation integration. if i will continue with 2dtoolkit it is certain that your package will gain me more features. unity 2d uses more polygon for sprites and colliders. i do not know pros and cons of this. i am looking for answer for this :)
     
  9. Pixelcloud-Games

    Pixelcloud-Games

    Joined:
    Apr 29, 2011
    Posts:
    160
    At the sprite: more precise polygons instead of a single quad is a good thing in terms of overdraw (less transparent pixels to be rendered/discarded). Wouldn't expect this to be a huge performance gain, but depends on the scene.
    At the collider: fewer polygons is better, so spend only as many as you need :).
     
  10. Pixelcloud-Games

    Pixelcloud-Games

    Joined:
    Apr 29, 2011
    Posts:
    160
  11. Yukichu

    Yukichu

    Joined:
    Apr 2, 2013
    Posts:
    420
    At $7.50, I couldn't afford to pass this up. I don't even know if I'll ever use it, but I use 2DToolKit and SmoothMoves... so probably. Thanks!
     
  12. Pixelcloud-Games

    Pixelcloud-Games

    Joined:
    Apr 29, 2011
    Posts:
    160
    Thanks very much :)
     
  13. Pixelcloud-Games

    Pixelcloud-Games

    Joined:
    Apr 29, 2011
    Posts:
    160
    Yay, our 2D ColliderGen Daily Deal was a great success! A Big Thanks everyone!! :)

    Cheers, Harald
     
  14. u9924032

    u9924032

    Joined:
    Sep 8, 2013
    Posts:
    6
    Thanks you a lot!! Pixelcloud Games:p:p
     
  15. YourUncleBob

    YourUncleBob

    Joined:
    Jun 11, 2012
    Posts:
    55
    I was just looking into this sort of algorithm, but not for generating collisions. I picked up a copy of ColliderGen because the pixel bounding code is useful for a couple of other things:

    One of them is creating better bounding geometry for a sprite to save fill-rate: http://www.humus.name/index.php?ID=266

    2D toolkit supports custom mesh's per texture in their atlas. We've built some by hand for some of our round, often used textures. Having something generate these automatically would be fantastic.

    I'm also going to look at integrating this into our atlas generator. We happen to have a lot of textures with 2 distinct areas separated by dead space. Our atlas packer currently just throws a bounding rectangle around any used pixels, so we end up with a lot of full-alpha pixels in our atlas in these cases. If we could identify the different regions and split the image into multiple small sprites rather than 1 large sprite we could save a ton of atlas space (and again fill-rate).

    I don't know how much demand their is for either of these, but it looks like you have most of the work done.
     
  16. Pixelcloud-Games

    Pixelcloud-Games

    Joined:
    Apr 29, 2011
    Posts:
    160
    I must admit I haven't thought about this before, very clever indeed! The only downside is that I could not afford to implement anything like it in the near future, since I'm already busy implementing previously requested features (at our quality standards this all takes a while, unfortunately).

    Especially the second point (packing a texture atlas even more efficiently) is a very clever idea, thanks for pointing this out!
     
  17. Pixelcloud-Games

    Pixelcloud-Games

    Joined:
    Apr 29, 2011
    Posts:
    160
    2D ColliderGen is now Permanently Reduced -50% (15$ instead of 30$)!

    If it has been too expensive for you at 30 bucks, maybe you want to give it a chance now..

    $Permanently50OFF_website_news.png

    Visit the Asset Store page: [link]
    Website with Documentation and Video tutorials: [link]

    And thanks so much again to all of you who have already purchased it! You guys rock! :)
    Cheers, Harald
     
  18. ADT

    ADT

    Joined:
    Oct 7, 2013
    Posts:
    6
    Hello,

    I kind of feel a bit dumb, but I'm not quite sure what is going on. I am using the Orthello 2D Framework (Pro version) and just purchased this product (about 2 hours ago or so). I have imported the package into my Unity Project, but every time I add a Mesh from the 2D ColliderGen Menu, I get a bunch of errors, saying that a collider mesh can't be loaded.

    So, a lot of "Unable to load the generated Collider Mesh 'Assets/Colliders/Generated/sheet-fish_test_0_058F2C7A.dae'!" and
    "Error: Encountered image width or height of 0. Stopping collider generation."

    I'm not sure what is going on. Any suggestions?
     
  19. Doddler

    Doddler

    Joined:
    Jul 12, 2011
    Posts:
    269
    Is it possible to generate collision meshes where the front of the collider is capped? What I mean is, I'm wanting to use the 2D ColliderGen colliders for mouse picking as well, and while the tool generates great colliders that match the outline of the object, they can't be used for input picking because they don't have any camera facing faces. I can get it to work on convex colliders by setting Is Convex on the mesh collider component itself, but sadly that's not very good for the objects I'm working with.
     
  20. u9924032

    u9924032

    Joined:
    Sep 8, 2013
    Posts:
    6
    I read your Runtime Collider Generation document and follow your steps but I have some problem.
    Although the codes are work, but can't generate the mesh collider, and the meshes are missing.
    What are the problem is?
    This is the codes below:

    Code (csharp):
    1.     private void AddCollider(VectorLine _vectorLine)
    2.     {
    3.         Mesh lineMesh = _vectorLine.vectorObject.GetComponent<MeshFilter>().mesh;
    4.         Bounds lineMeshBounds = lineMesh.bounds;
    5.         int tWidth = (int)lineMeshBounds.max.x;
    6.         int tHeight = (int)lineMesh.bounds.max.y;
    7.         Texture2D texture = new Texture2D(tWidth, tHeight);
    8.         texture.SetPixels32(lineMesh.colors32);
    9.        
    10.         PolygonOutlineFromImageFrontend pofif = new PolygonOutlineFromImageFrontend();
    11.        
    12.         bool [,] binaryImage;
    13.         pofif.BinaryAlphaThresholdImageFromTexture(out binaryImage,texture,0.1f,true,1,1,tWidth,tHeight);
    14.        
    15.         int [,]classifyImg;
    16.        
    17.         IslandDetector iDetector = new IslandDetector();
    18.         IslandDetector.Region[] islands;
    19.         IslandDetector.Region[] seaRegions;
    20.         iDetector.DetectIslandsFromBinaryImage(binaryImage,out classifyImg,out islands,out seaRegions);
    21.  
    22.         AlphaMeshCollider aCollider = _vectorLine.vectorObject.AddComponent<AlphaMeshCollider>();
    23.        
    24.                 //UnreducedOutlineFromBinaryImage
    25.         List<Vector2> outlineVectors = new List<Vector2>();
    26.         Vector3[] resultOutlineVectors;
    27.         int[] triangleIndices;
    28.         IntVector2[] islandStartingPoints = aCollider.CalculateIslandStartingPoints(binaryImage);
    29.         aCollider.OutlineAlgorithm.Backend.UnreducedOutlineFromBinaryImage(out outlineVectors,binaryImage,islandStartingPoints,true,false);
    30.        
    31.         aCollider.OutlineAlgorithm.Backend.TriangleFenceFromOutline(out resultOutlineVectors,out triangleIndices,outlineVectors,true);
    32.        
    33.     }
     
  21. Pixelcloud-Games

    Pixelcloud-Games

    Joined:
    Apr 29, 2011
    Posts:
    160
    Hi!

    Hm.. I do not remember having encountered such an error previously. Are you using the latest version of Orthello Pro? Does your object have a normal OTSprite attached? Or is it using a texture atlas? I assume that you have been trying to add the mesh colliders via selecting the OTSprite game object and then selecting "Add AlphaMeshCollider" from the 2D ColliderGen menu, right?

    Maybe you could send me a link to a stripped version of your project which allows me to reproduce the problem. Please also send me your unity logfile (can be accessed from the log-window IIRC).

    Kind regards,
    Harald
     
  22. Pixelcloud-Games

    Pixelcloud-Games

    Joined:
    Apr 29, 2011
    Posts:
    160
    Hi,

    Sorry - for now capped colliders are only supported with 'convex' turned on.
    A (not so nice) workaround for now would be to add multiple gameobjects with a convex part of the main image set as the "custom image" each. This does not seem very practical, however.
    Another workaround would be to turn the depth of the colliders up so that they extend in the Z axis and then trace an inclined ray instead of a perfectly z-axis-aligned one. This is what I would do in your case.

    Kind regards, HTH,
    Harald
     
  23. ADT

    ADT

    Joined:
    Oct 7, 2013
    Posts:
    6
    I am using the most recent version of Orthello Pro. I have been selecting the object in my scene and adding the AlphaMeshCollider from the menu. If it helps, I am using the OTAnimatingSprite, and not just the normal OTSprite. Would that effect it badly?

    And here is a bit of my editor log http://pastebin.com/dRHgnRtU

    I couldn't put all of it, as it is too large. Let me see if I can throw together a unity package of my project.
     
  24. Pixelcloud-Games

    Pixelcloud-Games

    Joined:
    Apr 29, 2011
    Posts:
    160
    Hi,

    I have included some advice directly in the code below.
    (I am writing this from a computer without Unity on it, so I might not be 100% correct on parameters, variable names, etc., but you should get the idea)

    Kind regards hth,
    Harald
     
  25. u9924032

    u9924032

    Joined:
    Sep 8, 2013
    Posts:
    6
  26. atmuc

    atmuc

    Joined:
    Feb 28, 2011
    Posts:
    1,148
    i think you do not give all source code. i had many many problems with non source code assets especially for new platforms. do you plan to give all source code?
     
  27. Pixelcloud-Games

    Pixelcloud-Games

    Joined:
    Apr 29, 2011
    Posts:
    160
  28. Pixelcloud-Games

    Pixelcloud-Games

    Joined:
    Apr 29, 2011
    Posts:
    160
    The computation-backend is included as a dll. All frontend source files are included, which means there will not be any problems with gameobject script references, as there is with e.g. SmoothMoves. There are wrapper source files such as PolygonOutlineFromImageFrontend.cs which should make custom scripting easier.
    And no, we don't plan to release the backend source-code.
     
  29. u9924032

    u9924032

    Joined:
    Sep 8, 2013
    Posts:
    6
    Thanks for your help.But I can't understand your codes and explains clearly(my English is very poor:().
    And this is my codes below. It's didn't not work from Unity play mode. Please help again. Big thanks!!!!:D:D

    PHP:
        private void AddCollider(VectorLine _vectorLine)
        {
            
    Mesh lineMesh _vectorLine.vectorObject.GetComponent<MeshFilter>().mesh;
            
    Bounds lineMeshBounds lineMesh.bounds;
            
    int tWidth = (int)lineMeshBounds.max.x;
            
    int tHeight = (int)lineMesh.bounds.max.y;
            
    Texture2D texture = new Texture2D(tWidthtHeight);
            
    texture.SetPixels32(lineMesh.colors32);
            
            
    PolygonOutlineFromImageFrontend pofif = new PolygonOutlineFromImageFrontend();
            
            
    bool [,] binaryImage;
            
    pofif.BinaryAlphaThresholdImageFromTexture(out binaryImage,texture,0.1f,true,1,1,tWidth,tHeight);
            
            
    int [,]classifyImg;
            
             
    IslandDetector iDetector = new IslandDetector();
            
    IslandDetector.Region[] islands;      // Each of these islands holds a starting point (mPointAtBorder or similar name).
            
    IslandDetector.Region[] seaRegions;   // Same here.
            
    iDetector.DetectIslandsFromBinaryImage(binaryImage,out classifyImg,out islands,out seaRegions);
            
            
            List<
    Vector2outlineVectors = new List<Vector2>();
            
    Vector3[] resultOutlineVectors;
            
    Vector4[] triangleIndices;
            
    int[] tringleIndices2D;
            
            
    MeshCollider meshCollider _vectorLine.vectorObject.AddComponent<MeshCollider>();
            
    Mesh mesh = new Mesh();
            
    meshCollider.sharedMesh mesh;
            
            
    mesh.vertices resultOutlineVectors;
            
    mesh.tangents triangleIndices;
            
    mesh.RecalculateBounds();
            
    meshCollider.sharedMesh mesh;
            
            
            
            
    AlphaMeshCollider aCollider = new AlphaMeshCollider();
            
    aCollider.OutlineAlgorithm.Backend.TriangleFenceFromOutline(out resultOutlineVectors,out tringleIndices2D,outlineVectors,true);

     
             
            
    // TODO: afterwards you will have to set your MeshCollider component's vertices and triangle indices. Please read the forum posts in the instruction on our website about how to do this (just a few lines).

            
        
    }
     
  30. ADT

    ADT

    Joined:
    Oct 7, 2013
    Posts:
    6
    So I guess this add-on can't be used with the animated Sprites in the Orthello Framework?
     
  31. Pixelcloud-Games

    Pixelcloud-Games

    Joined:
    Apr 29, 2011
    Posts:
    160
    Hi,
    You are assigning the wrong variables all over the place, but don't worry, I'll write a complete script for you that should do what you need ;)
    Kind regards,
    Harald
     
  32. Pixelcloud-Games

    Pixelcloud-Games

    Joined:
    Apr 29, 2011
    Posts:
    160
    Sorry, not yet, but it's on the roadmap (and also one of the next features, not somewhere at the end of the line).
     
  33. Pixelcloud-Games

    Pixelcloud-Games

    Joined:
    Apr 29, 2011
    Posts:
    160
    Now I'm done with an experimental RuntimeAlphaMeshCollider.cs script, please download it from here:
    http://pixelcloudgames.com/tools/2d-collidergen/documentation/runtime-collider-generation
    It's not optimized in any way, but you can take it as a reference and adapt it to your needs (or derive your own classes, whatever).

    I think this should help quite a lot ;)
    Cheers,
    Harald
     
  34. ADT

    ADT

    Joined:
    Oct 7, 2013
    Posts:
    6
    That is awesome. Do you happen to have a time frame and when this feature would be released?
     
  35. u9924032

    u9924032

    Joined:
    Sep 8, 2013
    Posts:
    6
    Thanks a lot!! And codes are work!!
     
  36. gardownmjm

    gardownmjm

    Joined:
    Mar 22, 2013
    Posts:
    1
    I have just installed 2d collider gen and have a few problems

    I get

    Assets/2DColliderGen/Scripts/AlphaMeshCollider.cs(1131,32): warning CS0618: `UnityEngine.GameObject.active' is obsolete: `GameObject.active is obsolete. Use GameObject.SetActive(), GameObject.activeSelf or GameObject.activeInHierarchy.'

    I am using unity 4.2.2f

    Thanks
     
  37. atmuc

    atmuc

    Joined:
    Feb 28, 2011
    Posts:
    1,148
    can i draw a collider manually with your asset? i want to use it with ragespline objects.
     
  38. Pixelcloud-Games

    Pixelcloud-Games

    Joined:
    Apr 29, 2011
    Posts:
    160
    It will not be very realistic to be done in the next two months, I expect the feature to be ready in the frame 2 - 5 months from now. Reason for it to take a bit longer is that convex sprite frames will be rather easy to support, but for concave sprite frames (which will certainly be needed to make sense with animated sprites) we need convex-splitting implemented first. Sorry about that.. If you guys however have applications where you are satisfied with all-convex sprites, maybe I could release it a bit earlier.
    Hope this is satisfactory for you.
    Cheers, Harald
     
  39. Pixelcloud-Games

    Pixelcloud-Games

    Joined:
    Apr 29, 2011
    Posts:
    160
    No, sorry, colliders can only be automatically generated with our toolset. There is no support for mouse drag-and-drop/insertion of vertices yet.
     
  40. Pixelcloud-Games

    Pixelcloud-Games

    Joined:
    Apr 29, 2011
    Posts:
    160
    You're welcome, glad you like it :)
     
  41. Pixelcloud-Games

    Pixelcloud-Games

    Joined:
    Apr 29, 2011
    Posts:
    160
    Thanks for the note. Do you encounter real problems or do you simply get some 'XY is obsolete' warnings? I will create some #if UNITY4 code branches to get rid of these warnings in the future, but they should not cause any trouble per se.
     
  42. fenderrio

    fenderrio

    Joined:
    Mar 2, 2013
    Posts:
    147
    This looks great! I wonder if it would work with TextFx...
     
  43. Pixelcloud-Games

    Pixelcloud-Games

    Joined:
    Apr 29, 2011
    Posts:
    160
    Hi! Nice tool that you have there!
    I cant really tell by looking at the screenshots, but I fear that it will be quite some additional work to support your package, since I guess that you use a font-atlas texture (in case of bitmap fonts) and not a single texture per GameObject..

    Cheers, Harald
     
  44. EmeralLotus

    EmeralLotus

    Joined:
    Aug 10, 2012
    Posts:
    1,459
    PixelCloud,

    Very cool package.

    I am mainly interested in the Runtime aspect of this really Awesome package but saddly
    noticed on your website that this feature is not well supported. "Experimental RuntimeAlphaMeshCollider.cs",

    It would be super if you would consider to flesh out this feature a bit more so that its easier for us to use.

    Cheers.
     
  45. Pixelcloud-Games

    Pixelcloud-Games

    Joined:
    Apr 29, 2011
    Posts:
    160
    Thanks for your comment! You brought up ideas in my mind that could be quite a leap in terms of ease-of-use of the runtime modifications. I first wanted to go with improving the runtime-performance, but I can see that usability is maybe more of an issue for you guys :).
    Cheers, Harald
     
  46. EmeralLotus

    EmeralLotus

    Joined:
    Aug 10, 2012
    Posts:
    1,459
    Great that you've got Ideas to make the run-time easier to use. Very much appreciated it.

    I'm mainly using on Mobile so perhaps while you are making it easier to use, it might also happen that the performance Eureka light bulb might also brighten.

    We'll definitely keep fingers crossed for many good ideas and solutions in the Run-time arena.

    Cheers.
     
  47. pkolbe

    pkolbe

    Joined:
    Oct 2, 2013
    Posts:
    8
    Hello,

    Any plans on updating the project to use the 2D physics introduced in 4.3? My current project is using 2D physics and I want to use your asset for the colliders.

    Any info would be appreciated.

    Regards,

    pk
     
  48. Pixelcloud-Games

    Pixelcloud-Games

    Joined:
    Apr 29, 2011
    Posts:
    160
    Hi,

    Yes, we will support them in the next update. Thanks for using 2D ColliderGen!
    Kind regards,
    Harald
     
  49. imgodot

    imgodot

    Joined:
    Nov 29, 2013
    Posts:
    212
    Harald,

    I just bought ColliderGen.
    I am trying to run it from Unity with no other 2D package installed.

    I can't seem to get a collider at all.
    I add a sprite to my scene and do AddAlphaMeshCollider.
    The collider component is created but there's no image file.
    It won't let me drag an image into "Custom Image" and if I cick the "Select"
    button it only shows me images from some ColliderGen subdirectory.

    1) How do I get it to use the image on my sprite? Does it have to be in some special folder?

    Thanks.

    -- Paul
     
  50. Pixelcloud-Games

    Pixelcloud-Games

    Joined:
    Apr 29, 2011
    Posts:
    160
    Hi,

    Sorry for the late answer, got ill and was pretty busy because of Christmas/work..

    We are working at it to make the usage with Unity 4.3's new Sprites and 2D PolygonColliders as comfortable and as automatic as possible, however until this new release is out, I suggest the following workaround in the meantime:

    Longer story:
    If you use Unity's new built-in Sprites, then by default there is no material component with any texture added at the GameObject, which is why there is no image detected automatically (as there would be when adding a Quad GameObject to the scene and dragging a texture at it). You should however be able to set a texture image at the Advanced Setting - Custom Image parameter (or drag e.g. a png file onto it). Note that it must be an image file that you drag onto this parameter, and not a material or a sprite. There should be no restrictions to any specific directory or whatsoever. Is this not possible at your setup? What kind of image files did you try to drag onto the parameter?

    I have to note that the topmost inspector element, which shows the current image and a "select" box below is a bit misleading, since this element does only display the active texture but does not allow to set it (I will change this in an oncoming update, so that it no longer displays the "Select" button and does not open any "choose file" window). You have to set the custom image via the Advanced Settings - Custom Image parameter, then as a result the image above changes as well. It's an interface problem. As said, this is not optimal and I will change this to avoid any further confusion.

    Some more questions: Does the AlphaMeshCollider's "Output Filename" parameter display anything, or is it empty? When attached to a Unity 4.3 Sprite, it first displays nothing and when setting Advanced Settings - Custom Image it should display a filename according to the texture name. But I guess you don't get so far, do you?

    What operating system are you working on? Do you have all access permissions to the directories (write, create directory, etc)?

    Hope this helps. If you problem persists, maybe you might want to attach a screenshot or the like.
    Regards, Harald