1
\$\begingroup\$

I have just tried downloading a library which will allow me to add animated tiles to unity. I have been following this tutorial:http://shadowpeakstudios.com/2018/10/22/unity-tutorial-animated-tiles/

It told me to download this library in order to work the animated tiles: https://github.com/Unity-Technologies/2d-extras

After this the tutorial told me to unzip the library and place it into my assets folder. It loaded into my assets folder and then got the following error:

Assets\2d-extras-master\2d-extras-master\Editor\Tiles\RuleTile\RuleTileEditor.cs(277,26): error 
CS1061: 'ReorderableList' does not contain a definition for 'IsSelected' and no accessible extension 
method 'IsSelected' accepting a first argument of type 'ReorderableList' could be found (are you 
missing a using directive or an assembly reference?)

Does anyone perhaps know why this error is occuring.

\$\endgroup\$
1
\$\begingroup\$
  1. Open Unity
  2. On top of Unity window, you will see your version number. Will look something like, Unity 2020.3.8f1
  3. Go to: https://github.com/Unity-Technologies/2d-extras
  4. On Unity 2d Extras Github, check to see if your Unity version above matches the current branch. If you're unsure, do Control + F and search the word Branches to find the branches link on Github, click this. This will take you to all the branches of 2d extras.
  5. Select the branch that matches your Unity Version. Ex: If my version is 2020.3, I would select the 2020.3 branch. Click the blue link to your branch.
  6. Click the green code button on top right of the branch page, download zip.
  7. Extract the zip folder once downloaded.
  8. Open your Unity project, go to Window -> Package Manager.
  9. Click the + in package manager, select Add package from disk.
  10. Locate your unzipped folder for 2d extras and select the package.json inside it, click open.
  11. The package will load into your project... fingers crossed error-free.
  12. Rejoice.

Note: If this helped, give this an upvote. If this didn't work, you most likely downloaded the incorrect version from Github. Also, make sure you deleted the prior 2d extras package from your Unity project that was giving you errors if you had one as this could cause file conflictions.

\$\endgroup\$
1
  • \$\begingroup\$ This solved my issue, amazing. I will put up a PR on repo to update readme to have this \$\endgroup\$ – Quinma Jun 16 at 23:31
0
\$\begingroup\$

You are most likely on an Unity version where their ReorderableList no longer provides the IsSelected method. Looking at the GitHub repository it seems that there are different branches for different versions of Unity. For an example the branch "2020.3" no longer seems to contain a reference to IsSelected, so you need to change to an appropriate branch of the repository that works with your version of Unity.

\$\endgroup\$
6
  • \$\begingroup\$ I think my version of Unity is 2019.4. Will that work? \$\endgroup\$ – DigitalRookie4 May 8 at 14:59
  • \$\begingroup\$ The repository also seems to have 2019 branches. \$\endgroup\$ – Tyyppi_77 May 8 at 17:55
  • \$\begingroup\$ Do you know where I can find this? \$\endgroup\$ – DigitalRookie4 May 8 at 21:01
  • \$\begingroup\$ The GitHub repository has a drop down with a list of branches. \$\endgroup\$ – Tyyppi_77 May 8 at 21:42
  • \$\begingroup\$ I changed my unity version to 2021.1. Will my projects and C# scripts be affected in any way? \$\endgroup\$ – DigitalRookie4 May 9 at 16:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.