Both can be combined into one script:
using UnityEngine;using AC;public class LimitItemsAndWeightFromContainer : MonoBehaviour{ public int maxItems = 8; public int maxWeight = 20; //To Replace for GVar public int currentWeight = 0; //To …
There's a couple of ways you can do this:
* Use an InventoryBox element whose Inventory box type is set to Display Last Selected, and then select/deselect the added item with a pair of Inventory: Select Actions before turning the menu on.
* Use a G…
Deleting an Action type shouldn't cause ActionLists that rely on it to break - I'll attempt a recreation.
Regarding your corrupted ActionList: leave it alone for the moment while I look into it.
The source of the problem may lie with the Inventory menu, in that case.
What are your AC/Unity versions, and does the issue exist if you also copy over the default Inventory menu in the same way?
Recreated, thanks for the details.
It's an issue with the "NavMesh search direction" field in the Settings Manager - specifically the "Radially Outwards From Cursor" option.
I shall address this for the next update, but you can…
Thanks, I appreciate it.
Though it's not exactly a workaround: it is possible to have the Console list all objects that reference a given Constant ID component, via the top-right button of that component's Inspector.
If you do find that you can pr…
(Quote)
You're right - I meant ShowGUI.
This function is used to draw the Action's UI. It may not strictly be necessary here, but it'll help re-assign Constant ID values with the speaker GameObject if appropriate. Again, you should be able to byp…
What are your AC/Unity versions, and platform are you building to?
AC will affect the cursor based on the Settings Manager's Hide cursor when locked? option (if the cursor is locked), and the Cursor Manager's Cursor rendering option. What are thes…
(Quote)
When AC repositions a Unity UI menu, it does so by manipulating the supplied "RectTransform boundary" - so this will need to either be a parent of your Text object, or the Text object itself.
Are you having this position issue wit…
You can use OnMenuElementClick, and examine the clicked menu/element titles to determine if it's the Container, i.e.:
private void OnMenuElementClick (AC.Menu menu, MenuElement element, int slot, int buttonPressed){ if (menu.title == "MyCon…
I'll need more details in order to recreate the problem.
What are your Unity/AC version numbers, is it for all scenes, and is there a pattern for Hotspots that are working vs not working?
It'd be worth trying to move the Start function code to an OnInitialiseScene custom event hook, which is triggered once AC has spawned in its own objects but before any data/initialisation routines are applied, i.e.:
private void OnEnable () { Even…
(Quote)
You need to get the parameter using the GetParameter function:
ActionParameter myParameter = AddWeighActionList.GetParameter ("MyParameter");
(Quote)
You're attempting to pass the instance of an Inventory item to a parameter of t…
That may be an issue with Unity, but you could bypass it by commenting out the "CustomSetDirty" call at the end. That is there to ensure the changes are recorded by Unity, but you should be able to achieve the same by viewing the ActionLi…