Search Unity

FastNoise Component use

Discussion in '2D' started by LankyJon, Mar 22, 2018.

  1. LankyJon

    LankyJon

    Joined:
    Mar 18, 2018
    Posts:
    13
    I'm wondering if anyone has any experience with FastNoise, or anyone can simply tell me how it might work to actually use the component within unity.

    I get adding the script to the project, and then calling it's functions from within my own script, but I imagine that has to not be the best way of using this. I can name the script instance and set values from Unity directly, but then I have no idea how I would call that particular instance. Any help?

    https://imgur.com/a/tvktL
     
  2. LankyJon

    LankyJon

    Joined:
    Mar 18, 2018
    Posts:
    13
    Update to the question:

    I have attached multiple instances of the FastNoise script to my game object. Each instance allows me to the set the name and the other variables. I have set the name of one to "caveNoise". I assume this means there is "public string name" within FastNoise, and I am setting that on each script I have attached. How do I then access that particular instance, instead of a new instance of FastNoise?

    My best guess, which doesn't work, is:
    caveNoise= GetComponent("caveNoise") as FastNoise;


    Thanks!