save texture to player prefs

I have a customization level in my game where it’s the familiar deal where you can scroll through and swap out outfits - which in this case is just textures. I have that part but I can’t figure the wording to save that into playerPrefs. as is the new outfit lasts just for that scene. Right no w I just have a couple keys to Set and Get as a test. the current error is:
Assets/swaptop.cs(11,17): error CS0029: Cannot implicitly convert type UnityEngine.Texture' to int’

using UnityEngine;
using System.Collections;

public class swaptop : MonoBehaviour {

	public Texture[] textures;
	public int currentTexture;
	public string thisOne;
	public GameObject top;
	void Start () {
		currentTexture = renderer.material.mainTexture = textures[currentTexture];;
	}
	

	void Update () {
		if(Input.GetKeyDown (KeyCode.T)) {
			currentTexture++;
			currentTexture %= textures.Length;
			renderer.material.mainTexture = textures[currentTexture];
		
		}
			if(Input.GetKeyDown (KeyCode.V)) {
				PlayerPrefs.SetInt ("newTop", currentTexture);

		}
				if(Input.GetKeyDown (KeyCode.N)) {
					PlayerPrefs.GetInt ("newTop");
		}

	}
}

currentTexture = renderer.material.mainTexture = textures[currentTexture];


You’re getting an error because you’re trying to assign a texture to an int.


Try: renderer.material.maintexture = texture[currentTexture];


You should be good with that.