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. Dismiss Notice

Spiderweb Generator

Discussion in 'Assets and Asset Store' started by kalagaan, Mar 10, 2017.

  1. koirat

    koirat

    Joined:
    Jul 7, 2012
    Posts:
    2,008
    Can you bake textures at runtime ?
    I would like to reduce number of textures in my project.
     
  2. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    1,487
    The bake function is done in the editor, but you could create your own function at runtime.
     
  3. Rowlan

    Rowlan

    Joined:
    Aug 4, 2016
    Posts:
    3,819
    @kalagaan i'm getting compiler errors in 2020.2 like this:

    Code (CSharp):
    1. Assets\SpiderwebGenerator\Editor\SpiderwebGeneratorEditor.cs(829,118): error CS0426: The type name 'DrawCapFunction' does not exist in the type 'Handles'
    Do you have a hint how to fix them?

    Edit: nvm, fixed myself. Would be nice though to get a working version directly from the store. In case anyone needs it:

    Code (CSharp):
    1. new Handles.DrawCapFunction(Handles.ArrowHandleCap)
    2. => Handles.ArrowHandleCap
    3.  
    4. new Handles.DrawCapFunction(Handles.RectangleCap)
    5. => Handles.RectangleHandleCap
    6.  
    7. Handles.DrawCapFunction cap
    8. => Handles.CapFunction cap
     
  4. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    1,487
    I've uploaded a fix on the assetstore (version 1.2.1) ;)
     
    Rowlan likes this.
  5. Rowlan

    Rowlan

    Joined:
    Aug 4, 2016
    Posts:
    3,819
    Thanks! First test with your asset in Lordenfel and the Camel Spider

    spider 01.jpg
     
    hopeful and kalagaan like this.
  6. SUUNE

    SUUNE

    Joined:
    Mar 10, 2019
    Posts:
    65
    Looks really cool. Any chance for HDRP support?
     
  7. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    1,487
    Yes, I've still some bugs to fix for now, but it will be available ;)
     
    SUUNE likes this.
  8. RakNet

    RakNet

    Joined:
    Oct 9, 2013
    Posts:
    313
    1.2.1 released January 14, 2021 crashes when used in 2020.2.2f1. This used to work with an older version I got June 29, 2019

    upload_2021-1-25_23-34-18.png


    upload_2021-1-25_23-41-1.png

    NullReferenceException
    UnityEngine.Renderer.set_material (UnityEngine.Material value) (at <82ec470c913149358ad0c83ad628910c>:0)
    Kalagaan.SpiderwebGeneratorExtension.SpiderwebGenerator+SpiderWeb.UpdateMaterial (Kalagaan.SpiderwebGeneratorExtension.SpiderwebGenerator generator) (at Assets/SpiderwebGenerator/Scripts/SpiderwebGenerator.cs:277)
    Kalagaan.SpiderwebGeneratorExtension.SpiderwebGenerator.LoadMaterialsReferences () (at Assets/SpiderwebGenerator/Scripts/SpiderwebGenerator.cs:493)
    Kalagaan.SpiderwebGeneratorExtension.SpiderwebGenerator.Awake () (at Assets/SpiderwebGenerator/Scripts/SpiderwebGenerator.cs:502)
    UnityEngine.Object:Instantiate(GameObject)
    DunGen.TilePlacementData:.ctor(PreProcessTileData, Boolean, DungeonArchetype, TileSet, Dungeon) (at Assets/DunGen/Code/TilePlacementData.cs:109)
    DunGen.DungeonGenerator:TryPlaceTile(DoorwayPair, DungeonArchetype, Tile&) (at Assets/DunGen/Code/DungeonGenerator.cs:759)
    DunGen.DungeonGenerator:AddTile(Tile, IEnumerable`1, Single, DungeonArchetype, TilePlacementResult) (at Assets/DunGen/Code/DungeonGenerator.cs:687)
    DunGen.<GenerateMainPath>d__91:MoveNext() (at Assets/DunGen/Code/DungeonGenerator.cs:446)
    DunGen.DungeonGenerator:Wait(IEnumerator) (at Assets/DunGen/Code/DungeonGenerator.cs:173)
    DunGen.<InnerGenerate>d__86:MoveNext() (at Assets/DunGen/Code/DungeonGenerator.cs:246)
    DunGen.DungeonGenerator:Wait(IEnumerator) (at Assets/DunGen/Code/DungeonGenerator.cs:173)
    DunGen.<GenerateMainPath>d__91:MoveNext() (at Assets/DunGen/Code/DungeonGenerator.cs:475)
    DunGen.DungeonGenerator:Wait(IEnumerator) (at Assets/DunGen/Code/DungeonGenerator.cs:173)
    DunGen.<InnerGenerate>d__86:MoveNext() (at Assets/DunGen/Code/DungeonGenerator.cs:246)
    DunGen.DungeonGenerator:Wait(IEnumerator) (at Assets/DunGen/Code/DungeonGenerator.cs:173)
    DunGen.<OuterGenerate>d__83:MoveNext() (at Assets/DunGen/Code/DungeonGenerator.cs:162)
    DunGen.DungeonGenerator:Wait(IEnumerator) (at Assets/DunGen/Code/DungeonGenerator.cs:173)
    DunGen.DungeonGenerator:Generate() (at Assets/DunGen/Code/DungeonGenerator.cs:110)
    DunGen.RuntimeDungeon:Generate() (at Assets/DunGen/Code/RuntimeDungeon.cs:30)
    <GenerateDungeon>d__4:MoveNext() (at Assets/Scripts/DunGen/NotifyQuestDunGenReady.cs:78)
    UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)
     
    Last edited: Jan 26, 2021
  9. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    1,487
    I did some tests with this specific version (2020.2.2f1 + SWG 1.2.1), and it works as expected.
    The previous version (1.2.0) can't compile properly in unity 2020.

    It looks like the main material couldn't be loaded, if youre using URP, you have to install the addon.
    If you're the built-in render pipeline, the material must be in the folder 'SpiderwebGenerator/Resources'

    Maybe you should try to reinstall the package.
     
  10. cptscrimshaw

    cptscrimshaw

    Joined:
    Aug 20, 2020
    Posts:
    3
    I'm having trouble getting the Spiderweb editor to show up, and I'm sure I'm missing something simple. This is all I see when I create a new spiderweb (and it's not showing up in the Scene). I'm using URP (and installed the addon) and am in 2D (which may not work entirely, but I thought I'd give it a shot). Any ideas?

    https://ibb.co/YLBZNBF
     
  11. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    1,487
    The spiderweb should be created at the position of the gameObject of the generator.
    I tried in 2D mode, and it works fine.

    What is your version of unity?

    EDIT : Did you enable the 'Gizmos' button in the scene view ?
     
  12. cptscrimshaw

    cptscrimshaw

    Joined:
    Aug 20, 2020
    Posts:
    3
    Oh am I an idiot - didn't have gizmos on :)

    Thanks so much!
     
  13. nsmith1024

    nsmith1024

    Joined:
    Mar 18, 2014
    Posts:
    869
    Hello,

    I just bought your web generator. It works for generating the web in the hierarchy, but when i try to drag the gameobject with the web from the hierarchy into the resource folder to turn it into a prefab, it doesnt work, seems the prefab doesnt have the mesh so nothing is seen when its instantiated.

    Can you help?

    Thanks
     
  14. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    1,487
    I'll fix it in the next release ;)
     
  15. Rowlan

    Rowlan

    Joined:
    Aug 4, 2016
    Posts:
    3,819
    I requested an automatic web generator some time ago. Is that already available? Otherwise it would be nice to get it in an update soon.
     
  16. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    1,487
    Really sorry, I didn't have time to search deeper for that :(
    This feature is not a priority in my todo list, I have more requests with other assets (VertExmotion/HairDesigner).
    So I'll probably do it, but I really don't know when... :confused:
     
  17. Rowlan

    Rowlan

    Joined:
    Aug 4, 2016
    Posts:
    3,819
    That's unfortunate. It really could benefit everyone. I mean, it shouldn't be that hard to just have a point of origin, ie center, do a few raycasts and create spider web points at the hit points. I'll look into it myself then.
     
  18. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    1,487
    Yes, doing a raycast is simple...
    But generating nice spiderwebs on different kind of walls/mesh requires more work, I you have to edit each spiderweb manually after the generation the tool won't be useful.
     
  19. Rowlan

    Rowlan

    Joined:
    Aug 4, 2016
    Posts:
    3,819
    I'll just try :) And I rather work from something that's barely useful than doing it from scratch.
     
    kalagaan likes this.
  20. Rowlan

    Rowlan

    Joined:
    Aug 4, 2016
    Posts:
    3,819
    Any news on HDRP?