How to Fix Unity Android Build and Run Error

You might get the following error after the APK builds and starts to copy to the device, “CommandInvokationFailure: Unable to install APK to device. Please make sure the Android SDK is installed and is properly configured in the Editor. See the Console for more details.”

This is fixed by uninstalling the app made in a previous version of Unity from the device.

Essential Unity Assets

Here’s a list of Unity assets starting with the most general that can be used in any project to the ones that are project specific with their templates.

Project

Script Inspector 3
https://bit.ly/3D6AoLQ

Hierarchy Pro 2021 – Extended
https://bit.ly/3VwysDo

Easy Save – The Complete Save Data & Serializer System
https://bit.ly/3CDK5ji

NPC Spawning and AI

Emerald AI 3.0
https://bit.ly/3TuU5lS

SoulLink Procedural AI Spawner
https://bit.ly/3COT94S

Story, Dialogue, and Lipsync

Dialogue System for Unity
https://bit.ly/3TuMnYG

SALSA LipSync Suite
http://bit.ly/2SfaNr8

Animation and Cutscenes

UMotion Pro – Animation Editor
http://bit.ly/3b3zcbM

ULTIMATE ANIMATION COLLECTION
https://bit.ly/3D6WRII

Slate Cinematic Sequencer
https://bit.ly/3rZY7qu

Master Audio 2022: AAA Sound
https://bit.ly/3CIfYHm

Animation Designer
https://bit.ly/3EOjW3N

Ragdoll Animator
https://bit.ly/3TjJJ8e

Nature and World Building

Enviro – Sky and Weather
https://bit.ly/3S8josE

Lux Water
https://bit.ly/3VMbOHt

Dynamic Water Physics 2
https://bit.ly/3s2Yvo8

Gaia Pro 2021 – Terrain & Scene Generator
https://bit.ly/3g9DLZf

GeNa Pro – Terrains, Villages, Roads & Rivers
https://bit.ly/3TLbaIr

Scene Optimizer
https://bit.ly/3D5BnvA

Animal pack deluxe
https://bit.ly/3eElu62

Animal pack deluxe v2
https://bit.ly/3CHu4ZK

FX

Impacts and Muzzle Flashes
https://bit.ly/3o6jpRZ

Ragdoll dismemberment system
https://bit.ly/3MCD8DA

Blood Spray
https://bit.ly/3CEqEH2

Templates

VR

Hurricane VR – Physics Interaction Toolkit
https://bit.ly/3qiKra2

Final IK
https://bit.ly/3D4BgjM

Photon PUN 2+
https://bit.ly/3yP89yt

FPS

Ultimate Character Controller
https://bit.ly/2JcAl7G

Rewired
https://bit.ly/3m1g57r

Ultimate Inventory System
https://bit.ly/3eJUK40

Agility Pack for Opsive Character Controllers
https://bit.ly/3s5Tr2v

Swimming Pack for Opsive Character Controllers
https://bit.ly/3eJT0ru

PUN Multiplayer Add-On for Opsive Character Controllers
https://bit.ly/3Ts863O

Photon PUN 2+
https://bit.ly/3yP89yt

SG Patcher How To

There are three essential riddles you have to solve to use this asset, and they mostly effect mobile.

The asset will install with an error, because the Newtonsoft dll it uses for Google’s API is a different version from the Unity package cache. You can fix this by disabling it from all targets including the editor in the inspector, or copy and replacing the ones in the package cache then deleting SG Patcher’s.

The second big obstacle is realizing all APIs will throw an error on android because they have to be IL2CPP instead of mono which is set through the Project Settings -> Player.

The third obstacle is realizing that you must use SIDGIN scene manager to load scenes instead of SceneManager.LoadScene().

These are all the show stoppers I encountered while using this necessary asset on my mobile game.

Here and Now

Just a little revelation. Master Oogway said something like “Yesterday is history. Tomorrow is a mystery, but today is a gift! That is why it is called the present.“. I find as I get older that regret eclipses more of my thinking. I realized in order for me for me to break my addiction cycle I needed to remove my focus from the past where regret lies. This leaves me with the present, and future.

Should I stop thinking about the future like Master Oogway is telling Po? Does this mean I disregard future consequence? Is present consequence a thing if the future is an illusion? Clearly I can’t act on the past anymore than I can act on the future. Ain’t I affecting the future and the past by changing the world in the present?

There’s no measure of planning that can amount to anything without physical execution. Acting on thought in the moment is the only way to affect reality. Deciding to do what’s right this moment is the only thing that matters. Sometimes the right decision is to stop, sometimes the right decision is simply not to stop, but’s mostly about taking the middle path.

Hurricane VR Impact Mod

I modified Hurricane VR HVRGunBase.cs script to allow impacts, marks, and sound around the OnHit function. I made this for the Impacts and Muzzle Flashes asset here https://bit.ly/3o6jpRZ ,here’s the code:

// Impacts
public ImpactInfo[] ImpactElemets = new ImpactInfo[0];
public float ImpactDelay = 2 f;
public float ImpactMarkDelay = 30 f;
public void DoImpact(RaycastHit hit) {
  GameObject impactedObject = hit.transform.gameObject;
  GameObject effect = GetImpactEffect(impactedObject);
  GameObject mark = GetImpactMark(impactedObject);
  DoImpactSound(impactedObject);
  if (effect != null) {
    GameObject effectIstance = Instantiate(effect, hit.point, new Quaternion()) as GameObject;
    effectIstance.transform.LookAt(hit.point + hit.normal);
    Destroy(effectIstance, ImpactDelay);
  }
  if (mark != null) {
    GameObject markIstance = Instantiate(effect, hit.point, new Quaternion()) as GameObject;
    markIstance.transform.LookAt(hit.point + hit.normal);
    Destroy(markIstance, ImpactMarkDelay);
  }
}

[System.Serializable]
public class ImpactInfo {
  public MaterialType.MaterialTypeEnum MaterialType;
  public GameObject ImpactEffect;
  public GameObject ImpactMark;
  public AudioClip ImpactSound;
}
GameObject GetImpactEffect(GameObject impactedGameObject) {
  MaterialType mt = GetMaterialType(impactedGameObject);

  if (mt == null)
    return null;

  foreach(var impactInfo in ImpactElemets) {
    if (impactInfo.MaterialType == mt.TypeOfMaterial)
      return impactInfo.ImpactEffect;
  }
  return null;
}
GameObject GetImpactMark(GameObject impactedGameObject) {
  MaterialType mt = GetMaterialType(impactedGameObject);

  if (mt == null)
    return null;

  foreach(var impactInfo in ImpactElemets) {
    if (impactInfo.MaterialType == mt.TypeOfMaterial)
      return impactInfo.ImpactMark;
  }
  return null;
}
void DoImpactSound(GameObject impactedGameObject) {
  MaterialType mt = GetMaterialType(impactedGameObject);
  AudioSource audio = new AudioSource();

  foreach(var impactInfo in ImpactElemets) {
    if (impactInfo.MaterialType == mt.TypeOfMaterial)
      if (impactInfo.ImpactSound != null) {
        audio.clip = impactInfo.ImpactSound;
        audio.Play();
      }
  }
}
MaterialType GetMaterialType(GameObject impactedGameObject) {
  MaterialType mt = new MaterialType();
  string lowerName = impactedGameObject.name.ToLower();
  if (impactedGameObject.layer == LayerMask.NameToLayer("Default")) {
    mt.TypeOfMaterial = MaterialType.MaterialTypeEnum.Plaster;
  } else if (impactedGameObject.layer == LayerMask.NameToLayer("NPC")) {
    mt.TypeOfMaterial = MaterialType.MaterialTypeEnum.Flesh;
  } else if (impactedGameObject.layer == LayerMask.NameToLayer("Water")) {
    mt.TypeOfMaterial = MaterialType.MaterialTypeEnum.Water;
  }

  if (lowerName.Contains("tree") || lowerName.Contains("wood") || lowerName.Contains("board")) {
    mt.TypeOfMaterial = MaterialType.MaterialTypeEnum.Wood;
  } else if (lowerName.Contains("metal")) {
    mt.TypeOfMaterial = MaterialType.MaterialTypeEnum.Metal;
  } else if (lowerName.Contains("glass") || lowerName.Contains("window")) {
    mt.TypeOfMaterial = MaterialType.MaterialTypeEnum.Glass;
  } else if (lowerName.Contains("rock") || lowerName.Contains("stone")) {
    mt.TypeOfMaterial = MaterialType.MaterialTypeEnum.Rock;
  } else if (lowerName.Contains("leaf") || lowerName.Contains("leaves")) {
    mt.TypeOfMaterial = MaterialType.MaterialTypeEnum.Foliage;
  }
  return mt;
}
public class MaterialType {

  public MaterialTypeEnum TypeOfMaterial = MaterialTypeEnum.Plaster;

  public enum MaterialTypeEnum {
    Plaster,
    Metal,
    Foliage,
    Rock,
    Wood,
    Brick,
    Concrete,
    Dirt,
    Glass,
    Water,
    Flesh
  }
}

protected virtual void OnHit(RaycastHit hit, Vector3 direction) {
    DoImpact(hit);

Smith VR About

So, who am I? Why am I doing this?

Hi, I’m Jeremy Smith. I’m a long time Unity, and web developer. As VR is becoming more widespread, I wanted to meet this growing demand with innovative story-driven games.

I do all aspects of the Unity workflow, and I offer everything between concepts to an optimized deliverables. There is no time like now to publish a VR game.

Design a site like this with WordPress.com
Get started