gurrenm3 / BTD-Mod-Helper

A powerful and easy to use API for modding BTD6, BATTD, and other Ninja Kiwi games.
https://gurrenm3.github.io/BTD-Mod-Helper/
GNU General Public License v3.0
180 stars 120 forks source link

Using the existing tower 3d model method for TowerDisplays results in an error. #84

Closed b-0-x-3-d closed 2 years ago

b-0-x-3-d commented 2 years ago

public override string BaseDisplay => Game.instance.model.GetTower(TowerType.DartMonkey).display; this is exactly the way that https://github.com/gurrenm3/BTD-Mod-Helper/wiki/Custom-Textures-and-Displays says to do it but it results in the error of

Severity Code Description Project File Line Suppression State Error CS0029 Cannot implicitly convert type 'Assets.Scripts.Utils.PrefabReference' to 'string' Funni C:\Users\boxed\OneDrive\Documents\BTD6 Mod Sources\Funni\Funni.cs 287 Active

TheMegax commented 2 years ago

That way of referencing existing tower displays is deprecated, use public override string BaseTower => TowerType.[towername];

b-0-x-3-d commented 2 years ago

consider that being in documentation then ig

doombubbles commented 1 year ago

It's simply that the .display property was turned into a PrefabReference by NK since writing that, now it's just .display.GUID to get it as a string