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
| public class EntityConfig : ScriptableObject { | |
| [SerializeField] private EntityConfig parentConfig; | |
| [SerializeField] private bool replace; | |
| [SerializeReference, SubclassSelector] private IConfigParam[] stats; | |
| public void Apply(ProtoWorld world, ProtoEntity entity) { | |
| if (parentConfig) | |
| parentConfig.Apply(world, entity); | |
| SetData(world, entity); |
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
| private static void ShareImageWithTextOnAndroid(string message, string imageFilePath) | |
| { | |
| AndroidJavaClass intentClass = new AndroidJavaClass("android.content.Intent"); | |
| AndroidJavaObject intentObject = new AndroidJavaObject("android.content.Intent"); | |
| intentObject.Call<AndroidJavaObject>("setAction", intentClass.GetStatic<string>("ACTION_SEND")); | |
| AndroidJavaClass uriClass = new AndroidJavaClass("android.net.Uri"); | |
| AndroidJavaObject uriObject = uriClass.CallStatic<AndroidJavaObject>("parse", "file://" + imageFilePath); | |
| intentObject.Call<AndroidJavaObject>("putExtra", intentClass.GetStatic<string>("EXTRA_STREAM"), uriObject); | |
| intentObject.Call<AndroidJavaObject>("putExtra", intentClass.GetStatic<string>("EXTRA_TEXT"), message); |
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
| public static void ShowToast(string text) | |
| { | |
| if (Application.platform == RuntimePlatform.Android) | |
| { | |
| AndroidJavaClass unityPlayer = new AndroidJavaClass("com.unity3d.player.UnityPlayer"); | |
| AndroidJavaObject activity = unityPlayer.GetStatic<AndroidJavaObject>("currentActivity"); | |
| activity.Call("runOnUiThread", new AndroidJavaRunnable( | |
| ()=> | |
| { |
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
| // Установка тега. TestSystem для отключения систем по тегу | |
| m_Systems | |
| .Add(new Player.Systems.RotateSystem()).SetTag("test") | |
| .Add(new Player.Systems.MoveSystem()).SetTag("test") | |
| .Add(new TestSystem()) | |
| // Класс расширения с методами | |
| public static class EcsSystemDisabler { | |
| private static EcsSystems _anySystem; |