using UnityEngine;
[System.Serializable]
public class Upgrade
{
[SerializeField] private string _typeName;
[SerializeField] private int _price;
[SerializeField] private float _damage;
}using System.Collections.Generic;
using UnityEngine;
using System.IO;
public class UpgrageList : MonoBehaviour
{
string _name="Tower";
[SerializeField] List<Upgrade>_upgrades;
[ContextMenu("Save")]
public void SaveState()
{
var json = JsonUtility.ToJson(this);
File.WriteAllText(Application.persistentDataPath + $"{_name}.so", json);
Debug.Log(Application.persistentDataPath);
}
[ContextMenu("Load")]
public void LoadState()
{
var json = File.ReadAllText(Application.persistentDataPath + $"{_name}.so");
JsonUtility.FromJsonOverwrite(json, this);
}
}
{"_upgrades":[{"_typeName":"Fire","_price":5,"_damage":"30"},{"_typeName":"Ice","_price":5,"_damage":"40"},{"_typeName":"Earth","_price":2,"_damage":"10"}]} 
doorAnim = gameObject.GetComponent();// не указан компонент
//надо
doorAnim = gameObject.GetComponent<Animator>();if (!doOnce)
{
raycastedDoor = hit.collider.gameObject.GetComponent(); // тут аналогично что за компонент нужен ?
CrosshairChange(true);
}if(Physics.Raycast(transform.position, fwd, out hit, rayLength, mask))
{
// Door
if (hit.collider.CompareTag(interactableTag)) это не надо тут и так выбор по маске идет зачем ещё и таг
{ ParticleSystem _pS;
void LateUpdate()
{
if (_pS.isPlaying)
{
Debug.LogError("ParticleSystem Is Play");
Debug.Log("System Location" + _pS.transform.position);
}
} using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Walker : MonoBehaviour
{
private Rigidbody2D rb;
public float speed = 1.5f;
private Vector2 moveVector;
public float jumpForce = 5.0f;
void Awake()
{
rb = GetComponent<Rigidbody2D>();
}
private void Update()
{
moveVector = transform.right * Input.GetAxis("Horizontal") * speed;
if (Input.GetKeyDown(KeyCode.Space))Jump();
}
void FixedUpdate()
{
if(moveVector.x!=0f)MoveCharacter();
}
void MoveCharacter()
{
moveVector.y=rb.velocity.y;
rb.velocity = moveVector;
}
void Jump()
{
rb.AddForce(transform.up*jumpForce, ForceMode2D.Impulse);
}
}
До этого тож была проблема с какой то обновой но там все прошло через пару включений, но в этот раз был дэдлайн так что возится времени не было.
Есть вариант что это может быть из за проблем с дровами m2