Inventory nearly done + a Unity/VSCode tip for you!

And a little eyecandy, too

;

Posted 12/22/2015 09:43:15 in Homestead

Updated 09/06/2017 02:38:12

It's so close, I can taste it! Mmm... tastes like holiday ham! All that remains is to write a few hooks into the system in order to add/remove items from the player inventory, editing the player controller code to use the system for tools and favorites list instead of the temporary hard-coded stuff I have right now.

Equipping tools will put them in a secondary slot, so you don't need to re-equip them if you're doing stuff like picking crops while watering others! They'll even stick to your currently-invisible tool belt with this neat effect.

This week, while trying to integrate Visual Studio Code more nicely with Unity, I came across a nice, open-source code editor called Atom that I've been trying out as well. It seems to have better Omnisharp/Intellisense functionality than VSCode, although it has crashed on me a few times. Before making the switch, though, I did write a shell script to get VSCode to accept the Unity Linux editor's command line arguments properly (so it actually opens the project, the correct file, and goes to the right line). Here it is, and hopefully it makes my fellow Unity/Linux developers' lives a little easier!

bash


#!/bin/bash
# Launcher script for VSCode and Unity3D
# Instructions:
# Save this script anywhere (I put it in "/opt/vscode")
# In Unity3D, open Edit->Preferences->External Tools
# Set "External Script Editor" to this script
# Set "External Script Editor Args" to the following (no spaces or #):
#       $(File)|$(Line)

IFS='|' read -r -a args < "$1"="" filename="${args[0]}" line="${args[1]}" projectdir="$(echo" "$filename"="" |="" sed="" "[email protected]\(.*/.*\)\(.*/assets\).*@\[email protected]")="" #="" change="" "/opt/vscode/code"="" to="" where="" you="" have="" installed="" vscode="" pt/vscode/code="" -r="" -g="" "$projectdir"="">
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40

That's all for this week, next time will bring news of what's to come in the new year!

ROADMAP: Tooling

Comments

Today