Comments (3)
You should be able to add multiple units to the queue for both the WarFactory and the Refinery, and you should be able to specify different types too. The next part I am working on for the tutorial is sound effects, so hopefully that will be added in the next couple of weeks (though no promises as to exactly when that will be).
from unity-rts-demo.
So to pry it out of you if I can (sorry, this is literally my first stab a C#), to add a second Tank, with exactly the same properties as the first, but to get a second tank to show on the build UI for the Warfactory, what would I need to tweak?
From what I can guess, I would hedge a bet that around line 7 of the WorldObject/Building/WarFactory/WarFactory.cs file would need to include another item for "Tank2"?
from unity-rts-demo.
Right, let's see if I can write this out clearly. In the Start() method in WarFactory.cs we are defining the actions to be displayed in the sidebar. So to get another build option to display you need to add a new option to this list. But for anything to display (or happen when you click the button that is created) you need to create a Prefab for the new object you want to create (so like the existing Tank prefab). This needs to include a build image (I think that is what it is called) for anything to show in the sidebar. This Prefab then needs to be added to the Units list of GameObjectList (like the current tank is). With those things in place you should be able to create a new Unit from your WarFactory.
Out of curiosity, have you actually worked through the tutorial that this project is part of? Because I am pretty sure that I go over how this process works there.
from unity-rts-demo.
Related Issues (7)
- The namespace `RTS' already contains a definition for `ResourceManager'.? HOT 22
- It seems like the 2d Hud is missing in this latest version. HOT 2
- Enhancement - Multiplayer HOT 3
- Won't run in Unity 5: "The referenced script on this Behavior is missing" HOT 2
- Continue of this tutorial HOT 6
- Are you going to make a new series?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from unity-rts-demo.