This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Unity.Entities; | |
using Unity.Transforms; | |
using UnityEngine; | |
public class CopyTransformToGameObjectConvert : MonoBehaviour, IConvertGameObjectToEntity | |
{ | |
public void Convert(Entity entity, EntityManager dstManager, GameObjectConversionSystem conversionSystem) | |
{ | |
dstManager.AddComponentData(entity, new CopyTransformToGameObject()); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
using Unity.Physics; | |
using Unity.Mathematics; | |
using Unity.Transforms; | |
using Unity.Entities; | |
using Unity.Physics.Systems; | |
[AlwaysUpdateSystem] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Unity.Entities; | |
using System; | |
public struct Life : IComponentData{} | |
[Serializable] | |
public struct LifeState : ISystemStateComponentData | |
{ | |
public Place lastPlace; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
using Unity.Entities; | |
using Unity.Jobs; | |
using Unity.Mathematics; | |
using Unity.Collections; | |
public class DestroyCheckSystem : JobComponentSystem | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Collections; | |
using UnityEngine; | |
using System.IO; | |
using System.Text; | |
public class LoadAssetbundle : MonoBehaviour | |
{ | |
AssetBundle bundle; | |
FileStream fileStream; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using UnityEditor; | |
using System.IO; | |
using System.Text; | |
public class AssetBundleBuilder | |
{ | |
const string password = "password"; | |
[MenuItem("Assets/Build")] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// original : https://stackoverflow.com/a/38974483 | |
public class SeekableAesStream : Stream | |
{ | |
private Stream baseStream; | |
private AesManaged aes; | |
private ICryptoTransform encryptor; | |
public bool autoDisposeBaseStream { get; set; } = true; | |
/// <param name="salt">//** WARNING **: MUST be unique for each stream otherwise there is NO security</param> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using Unity.Entities; | |
using Unity.Transforms; | |
using Unity.Mathematics; | |
using Unity.Collections; | |
public class DistanceCheckSystem : ComponentSystem | |
{ | |
ComponentGroup itemGroup, aiGroup; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using UnityEngine.AddressableAssets; | |
public class SwapCharacter : MonoBehaviour | |
{ | |
[SerializeField] Animator parentAnimator; // 登録するAnimator | |
private GameObject cacheCharacter; // 差し替え時に元オブジェクトを削除する用 | |
public void Load(string characterName) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using UnityEngine; | |
using UnityEngine.ResourceManagement; | |
class Sample : MonoBehaviour | |
{ | |
void Start() | |
{ | |
// 初期化 |