Skip to content

Instantly share code, notes, and snippets.

View James-Frowen's full-sized avatar

James Frowen James-Frowen

View GitHub Profile

What do each Objectives and Outcomes do

The "Mission Start" objective is the entry point for the mission, it is created automatically and can not be removed. It should be used to start the first real objectives for your mission. Objectives will not be started unless you use the Start Objective Outcome.

When an objective is complete, all outcomes for that objective will be triggered.

If units are not in any Spawn Unit Outcome they will be spawned when mission starts instead.

Objectives

None

@James-Frowen
James-Frowen / BetterToggleGroup.cs
Last active December 9, 2023 18:40
Better Toggle group because the built in Toggle group in unity is useless
// MIT License - Copyright (c) 2023, James Frowen
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class BetterToggleGroup : MonoBehaviour
{
public delegate void ToggleIndexOn(int index);
[SerializeField] private int currentValue;
@James-Frowen
James-Frowen / NetworkTransportDrawer.cs
Created August 11, 2023 13:54
popup to add transports to Mirror's networkmanager
[CustomPropertyDrawer(typeof(Transport))]
public class NetworkTransportDrawer: PropertyDrawer
{
public override void OnGUI(Rect position, SerializedProperty property, GUIContent label)
{
var fieldRect = position;
var buttonRect = position;
fieldRect.width -= 50;
buttonRect.xMin = fieldRect.xMax;
| Name | Description | time | method | | | | |
| | | Mean | Ratio | StdDev | StdError | min | max |
|----------|--------------------|-----------|--------|-----------|----------|-----------|------------|
| Method 1 | .net7 release | 13.503 us | | 8.782 us | 0.051 us | 7.230 us | 93.239 us |
| Method 1 | .net7 debug | 17.424 us | | 2.922 us | 0.017 us | 14.713 us | 33.308 us |
| Method 1 | unity 2022 release | 18.569 us | | 1.231 us | 0.007 us | 16.673 us | 23.667 us |
| Method 1 | unity 2020 release | 20.213 us | | 13.740 us | 0.079 us | 17.043 us | 220.575 us |
| Method 1 | unity 2020 debug | 23.255 us | | 1.762 us | 0.010 us | 20.754 us | 33.642 us |
| Method 1 | unity 2022 debug | 23.478 us | | 12.544 us | 0.072 us | 20.624 us | 235.884 us |
| | | | | | | |
/*
MIT License
Copyright (c) 2022 James Frowen
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
# Remove the line below if you want to inherit .editorconfig settings from higher directories
###############################
# Core EditorConfig Options #
###############################
root = true
[*.{cs,csx,vb,vbx,md}]
indent_style = space
indent_size = 4
tab_width = 4

Unity has changes how to create server build in 2021

Building from script

replace:

if (serverBuild)
    buildOptions |= BuildOptions.EnableHeadlessMode;
/*
MIT License
Copyright (c) 2022 James Frowen
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
@James-Frowen
James-Frowen / MessageTracker.cs
Created February 11, 2022 17:18
Message tracker for mirror
/*
MIT License
Copyright (c) 2021 James Frowen
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
@James-Frowen
James-Frowen / NetworkObjectCreater.cs
Last active April 12, 2022 15:14
Helper to create network objects at runtime
/*
MIT License
Copyright (c) 2021 James Frowen
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is